#Server function error code

1 messages · Page 1 of 1 (latest)

small cedar
#

is there a way to match on http error codes with server functions? Or would I have to use a nested result if I want the server function to return a potential error that the client can recieve and handle

weary rose
#

Inside the server function you can get or set the status code from the server context

#

When you get the result on the client, there isn't always an unique request associated with that server function call, so you can't match on the http error code but you can use a custom error type to represent your errors in the 0.7 version of dioxus

small cedar
small cedar
weary rose
weary rose
#

yes