Error Handling

Error Handling

FasCard API errors return standard HTTP response status codes: HTTP response status codes - HTTP | MDN

Legacy Endpoints

All legacy API calls (“legacy” currently corresponds to everything but WashDryFold) will return an HTTP 4xx error with details in the response body.

Error response example:

{ "Message": "The start code \"1234\" is unknown", "ErrorCode": 401 }

Field Name

Type

Description

Notes

Field Name

Type

Description

Notes

Message

string

Descriptive message of the error.

 

ErrorCode

integer

Error code ID

This is an internal error code. It does NOT correspond with the HTTP error code.

 WashDryFold endpoints

The WashDryFold API (and any future added/migrated) API calls will utilize standard HTTP error response (with body only when appropriate).

Examples:

  • return Forbid();

  • return NotFound("WDF order not found");

  • return BadRequest("Specified ValidUntilDate needs to be a future date/time");