Closed picklechips closed 5 years ago
@picklechips What made the linter's code incompatible with the client? Will we have to manually change this when we run the linter again in the future? If so, could we change something on the client side instead?
Will we have to manually change this when we run the linter again in the future?
No, it was just because the linter wanted promises to reject an Error object as opposed to a custom object. It was really this line that broke things: https://github.com/CGUC/skybunk-server/commit/31bf3f35817b6d64fb36657109aad694bfc2aa42#diff-d3dcb49f31e1454dea0244e2f90376edL116
We were rejecting a custom object, but the linter wanted an Error object so i was changed. This moves the custom object to the controller, which I think is a cleaner solution anyhow
This refers to the errors such as "Username not found" or "Incorrect password" when attempting to log in
The linting commit changed the way this error was formatted so it wasn't compatible with the client. This changes it back, however we should probably standardise the format of our error handling since it's kind of a mess as is.