You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
An operation handler can accept user-defined data types as long as they implement FromParts. This trait has an associated type called Rejection, which is used to signal an error if the user-defined data type cannot be constructed from the request.
Similarly, FromRequest is used by the framework to construct input/output structures (and their members) from the request. If it fails to do so, it raises an error using its Rejection associated type.
For example, if FromRequest fails to construct a parameter because Extension<State> is expected by the user-defined operation handler, but Extension<Arc<State>> is actually added by the extension layer, the server does not currently log a message indicating this construction failure. Instead, it simply returns a 500 Internal Server Error.
To improve troubleshooting, the server should log an entry to help users identify when a parameter could not be constructed.
The text was updated successfully, but these errors were encountered:
An operation handler can accept user-defined data types as long as they implement FromParts. This trait has an associated type called Rejection, which is used to signal an error if the user-defined data type cannot be constructed from the request.
Similarly, FromRequest is used by the framework to construct input/output structures (and their members) from the request. If it fails to do so, it raises an error using its Rejection associated type.
For example, if
FromRequest
fails to construct a parameter becauseExtension<State>
is expected by the user-defined operation handler, butExtension<Arc<State>>
is actually added by the extension layer, the server does not currently log a message indicating this construction failure. Instead, it simply returns a 500 Internal Server Error.To improve troubleshooting, the server should log an entry to help users identify when a parameter could not be constructed.
The text was updated successfully, but these errors were encountered: