Internal Server Error - Horror Stories about APIs and the Browser - LNUG - March 2018

Опубликовано: 23 Октябрь 2024
на канале: Pusher
122
1

Internal Server Error

Claudia (https://github.com/claudiamatosa)

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 scenariosStacktrace 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 (https://lnug.org/twitter.com/claudiam...) | github (https://lnug.org/github.com/claudiama...)