show detail for rpc bad request

This commit is contained in:
hippoz 2023-10-04 21:32:46 +03:00
parent 1bd0351f1b
commit b100f13640
Signed by: hippoz
GPG key ID: 56C4E02A85F2FBED

View file

@ -74,6 +74,10 @@ export function getErrorFromResponse(response) {
return { message: rpcErrorMessage, validationErrors: response.data.errors }; return { message: rpcErrorMessage, validationErrors: response.data.errors };
} }
if (response.data.code === RPCError.BAD_REQUEST.code) {
return { message: rpcErrorMessage + (response.data.detail ? `: ${response.data.detail}` : "") };
}
return { message: rpcErrorMessage }; return { message: rpcErrorMessage };
} }