region_mismatch
The message text is shown in the example below.
⚠️
Preview — this feature is being built; the design below is the spec. Not in the public error catalog: planned for preview endpoints.
| HTTP status | 403 |
type | permission_error |
| Retry? | No, not unchanged |
| Status | Preview |
| Extra fields | none |
When it happens
The request asked for, or reached, a region its workspace’s data may not be processed in.
Example
{
"error": {
"type": "permission_error",
"code": "region_mismatch",
"message": "This region is not allowed for this workspace.",
"param": null,
"request_id": "req_6f1c2a9e0b7d4c3a8e5f1b2d"
}
}How to fix it
- Remove the request’s
region, or use one the organization allows; see Data residency.
Detect it in code
err = resp.json().get("error", {})
if resp.status_code == 403 and err.get("code") == "region_mismatch":
log.warning("%s (%s)", err["message"], err["request_id"]) # fix the request; do not retry unchangedRelated
Was this page helpful?