Skip to content

Commit

Permalink
Merge pull request #17 from Deborah-Digges/deborah-digges/add-error-h…
Browse files Browse the repository at this point in the history
…andling-message-in-catch-all

Send error data when error occurs to display user error message
  • Loading branch information
Deborah-Digges authored Oct 15, 2024
2 parents 85133e7 + 5ca3bb8 commit 4067c19
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,7 @@ const server = createServer(async (request, response) => {
} catch (err) {
console.error(err);
response.statusCode = 500
response.write("data: Something went wrong\n\n")
response.end()
}
});
Expand Down

0 comments on commit 4067c19

Please sign in to comment.