pub enum ImpersonateError {
BadRequest,
Unauthorized,
Forbidden,
NotFound,
Unreachable(String),
UnexpectedResponse(String),
}Expand description
Represents the various errors that can be obtained after a impersonate request.
Variants§
BadRequest
Communication with the PocketBase API was successful,
but returned a 400 Bad Request HTTP error response.
The request requires valid record authorization token to be set.
Communication with the PocketBase API was successful,
but returned a 401 Unauthorized HTTP error response.
The request requires valid record authorization token.
Forbidden
Communication with the PocketBase API was successful,
but returned a 403 Forbidden HTTP error response.
The authorized record is not allowed to perform this action. Are you impersonating a user from a non-superuser account?
NotFound
Communication with the PocketBase API was successful,
but returned a 404 Not Found HTTP error response.
The requested resource wasn’t found. The given user id is probably wrong.
Unreachable(String)
Communication with the PocketBase API failed.
This could be caused by an internet outage, an error in the link given to the PocketBase SDK
and similar errors.
UnexpectedResponse(String)
The response from the PocketBase instance API was unexpected.
If you think its an error, please open an issue on GitHub.
Trait Implementations§
Source§impl Debug for ImpersonateError
impl Debug for ImpersonateError
Source§impl Display for ImpersonateError
impl Display for ImpersonateError
Source§impl Error for ImpersonateError
impl Error for ImpersonateError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
Auto Trait Implementations§
impl Freeze for ImpersonateError
impl RefUnwindSafe for ImpersonateError
impl Send for ImpersonateError
impl Sync for ImpersonateError
impl Unpin for ImpersonateError
impl UnwindSafe for ImpersonateError
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<T> ToStringFallible for Twhere
T: Display,
impl<T> ToStringFallible for Twhere
T: Display,
Source§fn try_to_string(&self) -> Result<String, TryReserveError>
fn try_to_string(&self) -> Result<String, TryReserveError>
ToString::to_string, but without panic on OOM.