1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-13 23:03:32 +00: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

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);
}
}
}