Error Messages
In addition to the HTTP response code, failed calls will contain error information in the message body. The format depends on where the error was generated. Messages generated by the Mashery Gateway have a different schema to messages generated by the API itself.
Example Mashery Gateway Error Message
Code snippet: Json
{ “Error”: “Not Authorized” }
Mashery errors are typically related to access control rather than URL content. It's likely that your access token is not valid for the requested resource. The request was not processed by the API.
Example API Error Message
Code snippet: XML
<?xml version="1.0" encoding="UTF-8"?>
<ProcessingErrors>
<ProcessingError RetryIndicator="false">
<Type>ResourceNotFound</Type>
<Code>2001</Code>
<Description>Invalid country code. Example: /references/countries/CH</Description>
<InfoURL>not supported yet: http://api.lufthansa.com/errorcodes/{processingError.Code}</InfoURL>
</ProcessingError>
</ProcessingErrors>
The API is still a prototype and not all aspects of the error handling schema are supported. There should, however, be enough information in the response to see the reason for the error and whether it is worth sending the same request again.
API Error Message Structure
Key | Description |
---|---|
ProcessingError@RetryIndicator | "True" indicates that the response can be retried (e.g. if a request to an over-loaded server times-out)."False" indicates that retrying the same request will certainly fail; the request should be modified. |
ProcessingError.Type | The category of error:
|
ProcessingError.Code | Error code relating to a particular type of error. The codes are in ranges according to error type. In future versions of the API it will be possible to use this code to uniquely identify a particular error.
|
ProcessingError.Description | A text description of the error - generally sufficient for a human user to understand what has gone wrong. |
ProcessingError.InfoURL | A future enhancement will be to provide a link to an online description of the error. It is not currenlty supported. |
Docs Navigation
- Lufthansa Open API
- Getting Started
- Public API Method Details
- Flight Schedules
- Reference Data
- Offers
- Operations
- Flight Schedules
- Flight Status
- Flight Status by Route
- Flight Status at Arrival Airport
- Flight Status at Departure Airport
- Flight Status Response
- Customer Flight Information
- Customer Flight Information at Arrival Airport
- Customer Flight Information by Route
- Customer Flight Information at Departure Airport
- Customer Flight Information Response
- Notifications
- cargo
- Partner API Method Details
- FlightOps/Crew API Method Details