Change error type for consistency

This commit is contained in:
Alasdair Smith 2017-12-12 12:50:20 +00:00
parent 6198491e5f
commit 5c62ac4f8a

View file

@ -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