Unmasking Errors
Common error messages from the Unmask API, what causes them, and how to fix them.
The Unmask API returns structured error messages for invalid or unauthorized requests.
Endpoint: PUT {baseurl}/api/vault/unmask
Common errors
| Scenario | HTTP status | Error message |
|---|---|---|
| Empty payload | Not specified | Payload is empty |
Missing unmask key | Not specified | unmask data missing |
Missing token_value field | Not specified | Missing token value field |
Empty token_value | Not specified | Missing token value |
| Unmask failure | Not specified | Unmasking of given token values failed. |
| Permission denied | 500 | Permission Denied |
| Prohibited toxicity output | 500 | Toxicity output is prohibited |
Permission and policy failures
Permission Denied and Toxicity output is prohibited are non-retryable authorization or policy failures. Correct the caller's permission or the relevant policy configuration before sending the request again; retrying the unchanged request will return the same failure.
These failures use HTTP 500 but are distinct from transient internal server errors that also use HTTP 500. Retry transient errors according to the Retry Behavior guidance, but do not retry these authorization or policy failures without changing the permission or policy configuration.
Example: Missing token_value
Request:
{
"unmask": [
{ "token_value": " " }
]
}
Response:
{
"data": null,
"success": false,
"error": {
"message": "Missing token value field"
}
}