Skip to content

Commit 4067c19

Browse files
authoredOct 15, 2024
Merge pull request #17 from Deborah-Digges/deborah-digges/add-error-handling-message-in-catch-all
Send error data when error occurs to display user error message
2 parents 85133e7 + 5ca3bb8 commit 4067c19

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed
 

‎src/index.ts

+1
Original file line numberDiff line numberDiff line change
@@ -225,6 +225,7 @@ const server = createServer(async (request, response) => {
225225
} catch (err) {
226226
console.error(err);
227227
response.statusCode = 500
228+
response.write("data: Something went wrong\n\n")
228229
response.end()
229230
}
230231
});

0 commit comments

Comments
 (0)
Failed to load comments.