From 5c62ac4f8aed26112aafbbbb8ee5ac9816dbb4a3 Mon Sep 17 00:00:00 2001 From: Alasdair Smith Date: Tue, 12 Dec 2017 12:50:20 +0000 Subject: [PATCH] Change error type for consistency --- services/web/app/coffee/Features/Errors/Errors.coffee | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/services/web/app/coffee/Features/Errors/Errors.coffee b/services/web/app/coffee/Features/Errors/Errors.coffee index ce236d5968..d88b243418 100644 --- a/services/web/app/coffee/Features/Errors/Errors.coffee +++ b/services/web/app/coffee/Features/Errors/Errors.coffee @@ -26,16 +26,16 @@ InvalidNameError = (message) -> return error InvalidNameError.prototype.__proto__ = Error.prototype -UnsupportedFileType = (message) -> +UnsupportedFileTypeError = (message) -> error = new Error(message) - error.name = "UnsupportedFileType" - error.__proto__ = UnsupportedFileType.prototype + error.name = "UnsupportedFileTypeError" + error.__proto__ = UnsupportedFileTypeError.prototype return error -UnsupportedFileType.prototype.__proto___ = Error.prototype +UnsupportedFileTypeError.prototype.__proto___ = Error.prototype module.exports = Errors = NotFoundError: NotFoundError ServiceNotConfiguredError: ServiceNotConfiguredError TooManyRequestsError: TooManyRequestsError InvalidNameError: InvalidNameError - UnsupportedFileType: UnsupportedFileType + UnsupportedFileTypeError: UnsupportedFileTypeError