context.LastError
property and can be used by policies in the on-error policy section. This article provides a reference for the error handling capabilities in API management.inbound
, outbound
, and on-error
sections as shown in the following example.AuthenticationError
, ForbiddenError
, UserInputError
, and a generic ApolloError
. These errors are designed to enhance errors thrown before and during GraphQL execution, making it easier to debug your Apollo Server integration and enabling clients to take specific actions based on an error.errors
array contains an extensions
object that contains the information added by Apollo Server.err.status
or by default 500. If err.expose
is true, then err.message
will be the reply. Otherwise, a message generated from the error code will be used (e.g. for the code 500, the message "Internal Server Error" will be used). All headers will be cleared from the request, but any headers in err.headers
will then be set. You can use a try-catch, as specified above, to add a header to this list.