Skip to content

feat: adding express error handling tiny bank API workshop#1131

Open
Ksound22 wants to merge 2 commits intomainfrom
feat/add-tny-bank-express-error-handling-workshop
Open

feat: adding express error handling tiny bank API workshop#1131
Ksound22 wants to merge 2 commits intomainfrom
feat/add-tny-bank-express-error-handling-workshop

Conversation

@Ksound22
Copy link
Member

Checklist:

Closes #996

@ShaunSHamilton
Copy link
Member

This looks good to me, but I do have suggestions:

  1. It is easier to test functions than variables
    • Prefer function x() {} over const x = () => {}
    • The reason is because of hoisting and AST locs
  2. Split the project up into modular pieces
    • Easier to test when a file just contains a few code blocks

I take it the lesson plan is?:
a) Teach error handling with try...catch
b) Then refactor to catch all thrown Errors with the middleware

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Create prototype for error handling in express workshop

3 participants