Errors Handling
General Information on Handling REST API Errors in the Marketplace Platform
All errors reported by the REST API have an HTTP status code and follow the standard format. When an error occurs, the response body usually contains a JSON object with the following fields:
type: [string] A URI reference that identifies the error type, providing a consistent way to categorize errors across different API implementations.
title: [string] A human-readable title or summary of the error.
status: [number] The HTTP status code associated with the error.
detail: (Optional) [string] A detailed human-readable description of the error, providing additional information to help clients understand the issue.
instance: (Optional) [string] A URI reference that identifies the specific occurrence of the error, useful for debugging or tracing purposes.
traceId: (Optional) [string] A unique identifier to trace requests in logs.
errors: (Optional) [key-value] A collection of errors detected by validation logic.
Common Errors
Some of the common errors are listed in the table below.
401 Unauthorized
This means the request lacks valid authentication credentials for the target resource. Check if the Authorization header is present and contains the valid token value.
403 Forbidden
The server understands the request but refuses to authorize it.
404 Not Found
The requested resource could not be found on the server.
409 Conflict
The request could not be completed due to a conflict with the current state of the resource.
415 Unsupported Media Type
The server refuses the request because the payload format is not supported.
500 Internal Server Error
The server encountered an unexpected condition that prevented it from fulfilling the request.
501 Not Implemented
The server does not support the functionality required to fulfill the request.
504 Gateway Timeout
The server, while acting as a gateway or proxy, did not receive a timely response from an upstream server.