1
0
mirror of https://github.com/bitwarden/browser.git synced 2024-10-31 08:20:37 +01:00

If error is of unkown type, create and error response from it. (#289)

* If error is of unkown type, create and error response from it.

* Update src/commands/send/receive.command.ts

simplify error handling

Co-authored-by: Oscar Hinton <oscar@oscarhinton.com>

Co-authored-by: Oscar Hinton <oscar@oscarhinton.com>
This commit is contained in:
Matt Gibson 2021-04-15 08:28:31 -05:00 committed by GitHub
parent 475efc4262
commit 6d46dc4b87
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -142,10 +142,9 @@ export class SendReceiveCommand extends DownloadCommand {
return Response.badRequest('Bad Request');
} else if (e.statusCode === 404) {
return Response.notFound();
} else {
return Response.error(e);
}
}
return Response.error(e);
}
}
}