From 0b4a3d1c23b40a7406b95414b6d58e0446a19da1 Mon Sep 17 00:00:00 2001 From: benesjan Date: Thu, 17 Aug 2023 06:37:23 +0000 Subject: [PATCH] feat: more generic error --- .../foundation/src/json-rpc/server/json_rpc_server.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/yarn-project/foundation/src/json-rpc/server/json_rpc_server.ts b/yarn-project/foundation/src/json-rpc/server/json_rpc_server.ts index dee461570e6..f217fee70dc 100644 --- a/yarn-project/foundation/src/json-rpc/server/json_rpc_server.ts +++ b/yarn-project/foundation/src/json-rpc/server/json_rpc_server.ts @@ -91,7 +91,7 @@ export class JsonRpcServer { } catch (err: any) { // Propagate the error message to the client. Plenty of the errors are expected to occur (e.g. adding // a duplicate recipient) so this is necessary. - ctx.status = 409; + ctx.status = 400; ctx.body = { error: err.message }; } }); @@ -121,7 +121,7 @@ export class JsonRpcServer { } catch (err: any) { // Propagate the error message to the client. Plenty of the errors are expected to occur (e.g. adding // a duplicate recipient) so this is necessary. - ctx.status = 409; + ctx.status = 400; ctx.body = { error: err.message }; } }