multiple fullstack nits/cleanups before release (#4852)
* feat: `:arg` syntax for serverfn * add better decode/encode verify message * allow catch-all query args * add rebind * implement websocket frames for `Streaming` * fix lazy init * wip... serverfnstate * wip... * wip: serverfns require Send/Sync, let's fix that * wip... * small cleanup * fix hang by actually spawning the tokio task * clippy * fix parameter catchall binding * fix lychee * doc tests
This commit is contained in:
1 parent
43373f0be7
commit
5559e463c8
27 files changed
+1395
-1097
No files matched your search
@@ -162,6 +162,20 @@ impl From<RequestError> for ServerFnError {
|
||||
}
|
||||
}
|
||||
|
||||
impl From<ServerFnError> for HttpError {
|
||||
fn from(value: ServerFnError) -> Self {
|
||||
let status = StatusCode::from_u16(match &value {
|
||||
ServerFnError::ServerError { code, .. } => *code,
|
||||
_ => 500,
|
||||
})
|
||||
.unwrap_or(StatusCode::INTERNAL_SERVER_ERROR);
|
||||
HttpError {
|
||||
status,
|
||||
message: Some(value.to_string()),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl From<HttpError> for ServerFnError {
|
||||
fn from(value: HttpError) -> Self {
|
||||
ServerFnError::ServerError {
|
||||
|
||||
Reference in new issue
Block a user