#305: cover InternalServerError with flowtype

This commit is contained in:
SleepWalker 2017-08-12 22:39:32 +03:00
parent 629a96dc16
commit b98be6b737

View File

@ -1,4 +1,5 @@
function InternalServerError(error, resp) {
// @flow
function InternalServerError(error: Error|string|Object, resp?: Response|Object) {
error = error || {};
this.name = 'InternalServerError';
@ -20,8 +21,8 @@ function InternalServerError(error, resp) {
Object.assign(this, error);
}
}
InternalServerError.prototype = Object.create(Error.prototype);
InternalServerError.prototype.constructor = InternalServerError;
export default InternalServerError;