Handling unknown crashes/errors/exceptions in Absinthe

How can we handle unexcepted exceptions/errors/crashes in Absinthe?

For example, let’s say something unexpected happens(pattern matching fails etc.), or a process crashes…
When I run a query in graphiql, when something like the above happens Absinthe/Phx returns an HTML response which is not valid for GraphQL spec.

What is the best way to deal with this and return proper JSON error payload to graphql client

1 Like

For anyone who is looking for answer, this worked for me

1 Like