Error handling best practice GraphQL

Alexandre_dupre
Tera Contributor

Hello everyone,

 

I'm learning GraphQL, but im still confuse about error handling. 
What's the best way to handle errors ? Is it possible to return http errors like REST API (404,401, etc). How to do that ?

I noticed some people using union type for each type, but this is a lot of code.

Do you have some tips on error handling with servicenow ?
Thank you !

0 REPLIES 0