Error Structure
Our API returns a consistent error structure for all errors. The API always returns a JSON response with an array ofissues, Onsi Issues always have a code and a message.
An exhaustive list can be found lower down.
Error List
Generic
We may introduce more specific error codes to replace the existing generic ones in the future. For now, we recommend
treating any generic error codes as a catch-all.
InternalServerError
This is our generic internal server error, this will be returned in cases where an unexpected error occursBadRequest
This is our generic bad request error, this will be returned in cases where the request is malformed or invalid and there is no more specific error code to return Example:Forbidden
This is our generic forbidden error, this will be returned in cases where the user is not allowed to perform the requested action Example:NotFound
This is our generic not found error, this will be returned in cases where the requested resource does not existConflict
This is our generic conflict error, this will be returned in cases where the request conflicts with the current state of the serverRateLimitExceeded
The request was rate limitedUnprocessableEntity
This is our generic unprocessable entity error, this will be returned in cases where the request is valid but cannot be processed due to business logic or other constraintsRequest Validation
BodyValidation
An error occurred while validating the request bodyQueryValidation
An error occurred while validating the request query parametersPathValidation
An error occurred while validating the request path parametersHeaderValidation
An error occurred while validating the request headersSpecific
MemberNotFound
The member could not be found Example:MemberNotEligible
The member is not eligible to perform the requested actionMemberAlreadyInvited
The member has already been invitedMemberInsufficientFunds
The member does not have enough funds to perform the requested actionBankAccountInvalid
The bank account provided is invalidFileContent
An error occurred while processing the file content, commonly used for CSV/Ecxel filesAmountBelowLowerLimit
The requested withdrawal intent amount is below the minimum which can be withdrawn, also returns the minimum amount which can be withdrawnA monetary value with currency. See Money
AmountAboveUpperLimit
The requested withdrawal intent amount is above the maximum which can be withdrawn, also returns the maximum amount which can be withdrawnA monetary value with currency. See Money