forked from webrpc/webrpc
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add built-in webrpc errors (webrpc#196)
* Add built-in webrpc errors * Regenerate interoperability tests
- Loading branch information
1 parent
503d4b5
commit a6758ac
Showing
7 changed files
with
129 additions
and
115 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
package gen | ||
|
||
import "github.com/webrpc/webrpc/schema" | ||
|
||
var WebrpcErrors = []*schema.Error{ | ||
{Code: 0, Name: "WebrpcEndpoint", Message: "endpoint error", HTTPStatus: 400}, | ||
{Code: -1, Name: "WebrpcRequestFailed", Message: "request failed"}, | ||
{Code: -2, Name: "WebrpcBadRoute", Message: "bad route", HTTPStatus: 404}, | ||
{Code: -3, Name: "WebrpcBadMethod", Message: "bad method", HTTPStatus: 405}, | ||
{Code: -4, Name: "WebrpcBadRequest", Message: "bad request", HTTPStatus: 400}, | ||
{Code: -5, Name: "WebrpcBadResponse", Message: "bad response", HTTPStatus: 500}, | ||
{Code: -6, Name: "WebrpcServerPanic", Message: "server panic", HTTPStatus: 500}, | ||
// Note: Do not change existing values. Append only. | ||
// Keep the list short. Code and Name must be unique. | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.