From 6d46dc4b87b0e8a20a11e299b21738065ec3b34d Mon Sep 17 00:00:00 2001 From: Matt Gibson Date: Thu, 15 Apr 2021 08:28:31 -0500 Subject: [PATCH] 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 Co-authored-by: Oscar Hinton --- src/commands/send/receive.command.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/commands/send/receive.command.ts b/src/commands/send/receive.command.ts index 9178dcffc80c..2550e791df7d 100644 --- a/src/commands/send/receive.command.ts +++ b/src/commands/send/receive.command.ts @@ -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); } } }