Home / Basics / Highnote API

API Error Handling

Query errors

The Highnote API rejects invalid queries and populates error information in the errors array. These errors are similar to compile-time errors and can be triggered if you send an invalid type or miss a required field.

In the case errors are present due to an invalid query, the API will return a 400 Bad Request response with the following body:

We recommend testing requests and queries in the test environment before using them in your live environment. After testing in the test environment, you should see very few errors.

Validation and logic errors

Highnote’s GraphQL API uses the errors as data pattern for validation and logic errors. Using data for errors allows Highnote to document and tailor what's being returned to your system in an impossible way using errors.

Invalid input errors are represented as data in the UserError that is part of the returned union type. All mutations have the UserError type on the union that you can select and query for errors.

Troubleshooting with request ID

The Highnote API includes a requestId field with a unique identifier for your request. The request ID should be used when you need help with a response. Ensure you log this ID on any errors you encounter so the Highnote support team can monitor and debug your request.

The requestId field can be found in the extensions key of the response:

Provide Feedback

Was this content helpful?