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

Support passing status code to ServerError

Open dertieran opened this issue 3 years ago • 0 comments

When throwing a ServerError it would be great to be able to set the status of the Response.

For example I would like to throw a 401 Unauthorized error, e.g. like this

throw new ServerError('Unauthorized', { status: 401 })

This allows that I don't need to build my own Response or ServerError.

dertieran avatar Aug 11 '22 11:08 dertieran