mirror of
https://github.com/elyby/accounts-frontend.git
synced 2025-01-04 11:12:49 +05:30
#305: cover InternalServerError with flowtype
This commit is contained in:
parent
629a96dc16
commit
b98be6b737
@ -1,4 +1,5 @@
|
|||||||
function InternalServerError(error, resp) {
|
// @flow
|
||||||
|
function InternalServerError(error: Error|string|Object, resp?: Response|Object) {
|
||||||
error = error || {};
|
error = error || {};
|
||||||
|
|
||||||
this.name = 'InternalServerError';
|
this.name = 'InternalServerError';
|
||||||
@ -20,8 +21,8 @@ function InternalServerError(error, resp) {
|
|||||||
Object.assign(this, error);
|
Object.assign(this, error);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
InternalServerError.prototype = Object.create(Error.prototype);
|
InternalServerError.prototype = Object.create(Error.prototype);
|
||||||
InternalServerError.prototype.constructor = InternalServerError;
|
InternalServerError.prototype.constructor = InternalServerError;
|
||||||
|
|
||||||
|
|
||||||
export default InternalServerError;
|
export default InternalServerError;
|
||||||
|
Loading…
Reference in New Issue
Block a user