2
0
mirror of https://github.com/frappe/books.git synced 2024-09-20 19:29:02 +00:00
books/docs/errors.md
2018-01-15 17:25:31 +05:30

325 B

Errors

Frappe.js comes with standard error classes that have an HTTP status code attached.

For example you can raise a "not found" (HTTP Status Code 404) via:

throw new frappe.errors.NotFound('Document Not Found');

Standard Errors

  • 403: Forbidden
  • 404: NotFound
  • 417: ValidationError
  • 417: ValueError