Skip to content

allow custom error code#14

Open
hannaeko wants to merge 3 commits intolestrrat-p5:masterfrom
hannaeko:improve-custom-error
Open

allow custom error code#14
hannaeko wants to merge 3 commits intolestrrat-p5:masterfrom
hannaeko:improve-custom-error

Conversation

@hannaeko
Copy link

@hannaeko hannaeko commented Aug 11, 2021

Allow setting custom error code (#7).

Throwing an error like this one:

die { code => -32000, data => { some => "data" }, message => "Internal error 012" };

results on the following json message:

{
  "id": 1,
  "error": {
    "data": {
      "some": "data"
    },
    "code": -32000,
    "message": "Internal error 012"
  },
  "jsonrpc": "2.0"
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant