Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error Handling #16

Open
ChristianGruen opened this issue Jun 5, 2013 · 1 comment
Open

Error Handling #16

ChristianGruen opened this issue Jun 5, 2013 · 1 comment

Comments

@ChristianGruen
Copy link
Member

Yet another idea: we’d like to introduce some error handling in RESTXQ. Our current favorite would be to specify a '%rest:error' annotation. If a function is decorated with this annotation, it could be called for certain HTTP codes or XQuery errors. Two examples:

  %rest:error(404, "{$msg}") { … }
  %rest:error("XPTY0004", "{$msg}") { … }

In this proposal, HTTP codes are specified via integers, and XQuery errors are specified as string. We could also introduce two different annotations to make the difference more explicit.

Feedback is welcome!

@ChristianGruen
Copy link
Member Author

This is how we've now realized RESTXQ error handling in BaseX: http://docs.basex.org/wiki/RESTXQ#Error_Handling

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

No branches or pull requests

1 participant