Skip to content

Tag: error-handling

POST net::ERR_NAME_NOT_RESOLVED

I’m trying to create a simple web application form. It requires the user to input their information, and click submit which ideally would hit an api and store the information somewhere like dynamodb. I have this code which is returning a response error POST net::ERR_NAME_NOT_RESOLVED For the life of me,…

When and why is it good to create custom exceptions?

I am working on a complex application with different types of errors, services, and domain concepts. In order to throw “object” errors, there are two different approaches that come to my mind: Applying Object.assign() to an Error object (easy option if I just need to throw a single or a couple of …

Error handling inside addEventListener callback

How do developers structure their programs if they want to have a top-level error handling function? The immediate thought that came into my mind was to wrap a try..catch to the main function, however, this does not trigger errors from callbacks? Answer In javascript you can override global onerror, catching …