Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
NOTE: This is a preview, I'm looking for some feedback and the definition of ServerError...once we settle on the basic idea, then i'll go and change as many ParseErrors into ServerErrors that makes sense.
see: #661
The problem this pr is trying to solve:
When an error occurs on the server, a message should
be returned to the client, and a message should be logged.
Currently, noting is often logged.
Byt adding a ServerError class, we can embed a ParseError into
the ServerError. The ServerError contains the message for the log
and the ParseError contains the error for the client.
In addition, this pr will stop calling the default express error handler
which causes two problems: 1. it writes to console instead of log file
2. the output is completely useless! :)