pub enum FunctionsError {
InvalidFunctionName(String),
Url(ParseError),
UrlNotBase,
HeaderName(InvalidHeaderName),
HeaderValue(InvalidHeaderValue),
Serialize(Error),
Transport(Error),
Relay {
status: StatusCode,
body: String,
},
Http {
status: StatusCode,
body: String,
},
Decode(Error),
}Expand description
Errors returned by crate::FunctionsClient and crate::InvokeBuilder.
Variants§
InvalidFunctionName(String)
The function name is empty, . or .., or contains /, tab, CR, or LF.
Url(ParseError)
The project URL cannot hold the functions path.
UrlNotBase
The project URL cannot be a base URL (for example mailto:).
HeaderName(InvalidHeaderName)
A header name is not valid.
HeaderValue(InvalidHeaderValue)
A header value is not valid.
Serialize(Error)
The request body cannot be serialized to JSON.
Transport(Error)
The request did not complete (connection, TLS, timeout, or body read failure).
Relay
The Supabase relay failed to reach the function (x-relay-error: true).
Http
The function returned a non-2xx status.
Decode(Error)
The response body is not valid JSON for the requested type.
Trait Implementations§
Source§impl Debug for FunctionsError
impl Debug for FunctionsError
Source§impl Display for FunctionsError
impl Display for FunctionsError
Source§impl Error for FunctionsError
impl Error for FunctionsError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0:
use the Display impl or to_string()
Source§impl From<Error> for FunctionsError
impl From<Error> for FunctionsError
Source§impl From<InvalidHeaderName> for FunctionsError
impl From<InvalidHeaderName> for FunctionsError
Source§fn from(source: InvalidHeaderName) -> Self
fn from(source: InvalidHeaderName) -> Self
Converts to this type from the input type.
Source§impl From<InvalidHeaderValue> for FunctionsError
impl From<InvalidHeaderValue> for FunctionsError
Source§fn from(source: InvalidHeaderValue) -> Self
fn from(source: InvalidHeaderValue) -> Self
Converts to this type from the input type.
Source§impl From<ParseError> for FunctionsError
impl From<ParseError> for FunctionsError
Source§fn from(source: ParseError) -> Self
fn from(source: ParseError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl !RefUnwindSafe for FunctionsError
impl !UnwindSafe for FunctionsError
impl Freeze for FunctionsError
impl Send for FunctionsError
impl Sync for FunctionsError
impl Unpin for FunctionsError
impl UnsafeUnpin for FunctionsError
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more