The default error handling logic for the http transport's POST
route handler always returns a parse error. However, after the introduction of sessions, it's possible an error may have been thrown by the session store itself as well. we should be able to return appropriate error messages to the client in this ase
const errorResponse = createJsonRpcError(
null,
new RpcError(
JSON_RPC_ERROR_CODES.PARSE_ERROR,
"Parse error",
error instanceof Error ? error.message : "Unknown parsing error",
).toJson(),
);