Internal Server Error Horror Stories about APIs and the Browser - Claudia Matosa - LNUG March 18

Tuesday, 27 March 2018

Who hasn't found themselves in despair after hours of trying to debug a problem that seemed simple, because halfway down the line the stack trace ended in a file called throw-error.js, or simply there were no errors thrown and the code just didn't work as expected?

The talk will last between 15 and 20 minutes, will be structured in two parts and there will be plenty of gifs and emojis. It should cover errors in Node and browsers.

1. Common bad error handling scenarios

  • Stacktrace lost.
  • Code exits without error.
  • Generic error messages (something has failed).
  • ...

2. Exploring possible solutions (examples)

  • Custom errors.
  • Formatting error api responses.
  • Displaying errors in the UI.
  • Examples when using Apollo (GraphQL), React and maybe other tools.

Conclusion: your library/utility/api should be built around its users, and they shouldn't need to read the code to know why something is wrong.

(I'm really bad with titles 😳)

I'm a freelance front-end developer, currently working with React and GraphQL. twitter | github