blazeauth
GuidesCpp

C++ error handling

Map APIStatus codes to user-facing messages and retry behavior.

C++ error handling

Every response contains a status field. Status is an integer APIStatus code.

For the full list, see the protocol reference page.

You usually want three categories in your client:

  • User action required: invalid credentials, invalid license, expired license
  • Retryable: transient network conditions, server busy
  • Developer issue: invalid request payload, invalid credentials type, missing initialize
Handle APIStatus
Categorize status codes and map them to retry behavior.

Displaying errors

A good UX pattern:

  • show a short message to the user
  • log the full status code and request id for support
  • avoid leaking internal details (raw server messages) into UI text

On this page