Content
@
0 reply
0 recast
2 reactions
iSpeakNerd 🧙♂️
@ispeaknerd.eth
rapidly learning that i need a standardized error method with bubbling. are the errors from the database, from the biz logic or from the api query? would like error context to bubble appropriately. am very sure i am currently doing it on hard mode with throws that don't communicate context well
3 replies
0 recast
3 reactions
Mo
@meb
I generally recommend a set of custom errors that extend the base error class. You can also have a http code as part of each custom error Wrap your API with a global error handler that gets uncaught errors and completes with error response Then, when throws occur your api now automagically have relevant status codes and good messages
0 reply
0 recast
0 reaction