Skip to content

Conversation

@acinader
Copy link
Contributor

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! :)

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! :)
import Parse from 'parse/node';
import Config from '../Config';
import mime from 'mime';
import ParseServer from '../ParseServer';
Copy link
Contributor Author

@acinader acinader Jan 24, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not a fan of re-formatting the whitespace all the time and i don't even think it looks better or is more readable anyway.....

@acinader
Copy link
Contributor Author

grrr.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants