You've already forked AstralRinth
forked from didirus/AstralRinth
Fix PayPal SSO OAuth callback (#4758)
* Maybe fix PayPal SSO * cargo sqlx prepare * maybe works * Attempt 2 of fixing * Fix vue * Try adding more logging to flow
This commit is contained in:
@@ -18,6 +18,8 @@ use thiserror::Error;
|
||||
|
||||
#[derive(Error, Debug)]
|
||||
pub enum AuthenticationError {
|
||||
#[error(transparent)]
|
||||
Internal(#[from] eyre::Report),
|
||||
#[error("Environment Error")]
|
||||
Env(#[from] dotenvy::Error),
|
||||
#[error("An unknown database error occurred: {0}")]
|
||||
@@ -53,6 +55,9 @@ pub enum AuthenticationError {
|
||||
impl actix_web::ResponseError for AuthenticationError {
|
||||
fn status_code(&self) -> StatusCode {
|
||||
match self {
|
||||
AuthenticationError::Internal(..) => {
|
||||
StatusCode::INTERNAL_SERVER_ERROR
|
||||
}
|
||||
AuthenticationError::Env(..) => StatusCode::INTERNAL_SERVER_ERROR,
|
||||
AuthenticationError::Sqlx(..) => StatusCode::INTERNAL_SERVER_ERROR,
|
||||
AuthenticationError::Database(..) => {
|
||||
@@ -87,6 +92,7 @@ impl actix_web::ResponseError for AuthenticationError {
|
||||
impl AuthenticationError {
|
||||
pub fn error_name(&self) -> &'static str {
|
||||
match self {
|
||||
AuthenticationError::Internal(..) => "internal_error",
|
||||
AuthenticationError::Env(..) => "environment_error",
|
||||
AuthenticationError::Sqlx(..) => "database_error",
|
||||
AuthenticationError::Database(..) => "database_error",
|
||||
|
||||
Reference in New Issue
Block a user