Error Handling
The User Profile API provides two ways to access user data, each with its own error handling approach:
- GraphQL API: Returns errors within 200 OK responses, supporting partial success
- REST API (OIDC UserInfo): Uses standard HTTP status codes for error responses
Key Differences
| Aspect | GraphQL API | REST API |
|---|---|---|
| Success indicator | Check data field |
HTTP 2XX status |
| Error indicator | Check errors array |
HTTP 4XX/5XX status |
| Partial success | Supported | Not applicable |
| Error details | extensions object |
Response body |
| Error codes | UP-XXX-XXX format |
Standard HTTP codes |
Authentication Errors
Authentication errors (invalid tokens, missing credentials, insufficient scopes) are handled by the APS Authentication service. For details on authentication error codes and responses, see Authentication Error Handling.
Next Steps
- GraphQL Error Handling - Learn how GraphQL errors work
- REST API Error Handling - Learn how REST errors work
- Error Codes Reference - Complete list of User Profile API error codes