https://medium.com/@aiden.web/error-handling-patterns-and-best-practices-in-javascript-a-comprehensive-guide-7b811e01ac0d