Skip to content

Commit

Permalink
If error is of unkown type, create and error response from it. (#289)
Browse files Browse the repository at this point in the history
* 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>
  • Loading branch information
MGibson1 and Hinton committed Apr 15, 2021
1 parent 475efc4 commit 6d46dc4
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/commands/send/receive.command.ts
Expand Up @@ -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);
}
}
}

0 comments on commit 6d46dc4

Please sign in to comment.