drio
Technical Review

Errors

Understand the two error families returned by the drio management API.

The drio management API returns two different error families. Which one you get depends on which part of the API you are calling.

First Question: Which Route Family Failed?

If the failing route is...Expect this error format
/.well-known/* or /api/v1/auth/*OAuth-style error response
/api/v1/me, /api/v1/templates/*, or /api/v1/apps/*drio resource API error envelope

1. OAuth Errors

Discovery and auth routes use OAuth-style error responses.

Applies to:

  • /.well-known/*
  • /api/v1/auth/*

Example:

{
  "error": "invalid_request",
  "error_description": "Missing required field: refresh_token"
}

Common auth error codes:

  • invalid_request
  • invalid_client_metadata
  • invalid_grant
  • invalid_token
  • server_error

2. Resource API Errors

Templates, apps, and user routes use the drio API error envelope.

Applies to:

  • /api/v1/me
  • /api/v1/templates/*
  • /api/v1/apps/*

Example:

{
  "error": {
    "code": "not_found",
    "message": "App not found",
    "details": null,
    "requestId": "4c9b58ff-69a7-4ccf-840d-a0f1ec9f9d77"
  }
}

Common Protected Error Codes

  • bad_request
  • unauthorized
  • forbidden
  • not_found
  • validation_error
  • internal_error

Typical Status Codes

StatusMeaning
400Invalid input or malformed auth request
401Missing, invalid, or expired bearer token
403Authenticated but not allowed to access that resource
404The requested route or resource does not exist
500Unexpected server-side failure

How To Debug Faster

  • if the failure came from /api/v1/auth/*, debug it as an OAuth issue
  • if the failure came from /api/v1/apps/* or /api/v1/me, debug it as a resource API issue
  • use requestId from the resource envelope when coordinating support or log lookup