swepayError Catalog

Native Guard

Token Revocation Failed 500

The user was not deleted because their active tokens could not be revoked.

type https://errors.swepay.com.br/native-guard/token-revocation-failed

What this means

Returned by DELETE /admin/v1/realms/{realmId}/users/{userId}. Native Guard revokes all of a user's active tokens before deleting the user. If that revocation fails, the deletion is aborted: the user still exists and their sessions were not terminated.

The request itself is well-formed — the failure is on the service side, so the status is 500. Identify this case by type: unlike a generic internal error, it tells you the deletion did not happen and can be retried.

Common causes

  • A transient failure in the token store while the user's tokens were being revoked.
  • The revocation was interrupted part-way, so some tokens may already be revoked while others are still active.

How to resolve

The request is safe to retry: send the same DELETE again, with backoff between attempts. Until it succeeds, treat the user as still existing and their tokens as possibly still valid. If the error persists, contact Swepay support and include the traceId.

error and errorDescription are deprecated compatibility members of the Admin API; key your handling off type.

Example response

HTTP 500 · application/problem+json
{
  "type": "https://errors.swepay.com.br/native-guard/token-revocation-failed",
  "title": "Token Revocation Failed",
  "status": 500,
  "detail": "Token revocation failed",
  "traceId": "Root=1-00000000-000000000000000000000000;Parent=0000000000000000;Sampled=0",
  "error": "token_revocation_failed",
  "errorDescription": "Token revocation failed"
}

References

Machine-readable: /native-guard/token-revocation-failed.json