Error codes

Responses and error-handling

HTTPS Error

Every request processed through the SingleView APIs will have a response among the following:

✔️ Successful ❌ Unsuccessful ⚠️ Error

HTTP StatusDescriptionHandling
200Success
4XXClient side errorSpot the invalid parameters from the message and retry by entering valid details
5XXInternal/server errorRetry later

MW Errors

These middleware error are designed to pinpoint issues in the API integration layer before they reach the main application logic.

{
  "correlationId": "2163bbf3-c6e1-4c0b-aac3-3b1b06552388",
  "bankCode": "",
  "errorCode": "MW-401",
  "errorMessage": "Authentication token has expired. Please re-authenticate.",
  "timeStamp": "2025-02-28T07:35:25.981+03:00"
}

Description

JSON TagDescriptionData Type
correlationIdUnique correlation identity parameter for each response of invalid access tokenString
bankCodeUnique bank identification codeAlphanumeric
errorCodeCode representing the error encounteredString
errorMessageMessage explaining the details about the error encounteredString
timeStampDate and time of the errorDate

Error Codes

errorCodeerrorMessage
MW-400Error occurs when one or more inputs in the header are missing:
  • `Required header 'Authorization' not specified
  • Required header 'CompanyId' not specified
  • Required header 'SVReferenceId' not specified
  • Required header 'Device' not specified
  • Required header 'DateTimeStamp' not specified
Error occurs when a mandatory field is missing the request body:
  • Required fields are missing in request body: Field Name
MW-401This error occurs when authentication token is expired or an active token doesn't match the CompanyId mentioned in the header:
  • Authentication token has expired. Please re-authenticate.
  • Access denied. Token is not authorized for the specified CompanyId.
Error occurs if payload and signature doesn't match:
  • Signature and message does not match.
MW-403Error occurs when a user tries to access a service that they does not have a subscription:
  • Unauthorized to access this service. Please contact singleview support team.
MW-404Resource Not Found
MW-405Requested Method not allowed
MW-406Not acceptable
MW-415Unsupported Media Type
MW-429Too many requests received
MW-500Technical error
MW-503Service Unavailable
MW-504Gateway Timeout

Certificate Error

This error occurs when there is an issue with TLS handshake.

{
  "error": "Client certificate and private key are required",
  "message": "Ensure that the request includes the client certificate issued by Singleview along with the corresponding private key."
}

Connectivity Error

This error occurs where there is an issue regarding connectivity to the SingleView APIs.

<html>
  <head>
    <title>504 Gateway Time-out</title>
  </head>
  <body>
    <center>
      <h1>504 Gateway Time-out</h1>
    </center>
    <hr>
    <center>nginx</center>
  </body>
</html>