solid-start icon indicating copy to clipboard operation
solid-start copied to clipboard

Document how to return errors from actions

Open viridia opened this issue 3 years ago • 1 comments

Currently the documentation makes no mention of how to return an error code from a createRouteAction or createServerAction. I assume it's one of either throw some error, or return a response object with an HTTP status code.

viridia avatar Nov 08 '22 23:11 viridia

Some specific asks:

  • Document the proper uses of FormError.
  • Explain how to throw an exception that causes a specific HTTP error code to be returned (404, 401, etc.)

viridia avatar Nov 17 '22 19:11 viridia