mirror of
https://github.com/juspay/hyperswitch.git
synced 2025-11-01 02:57:02 +08:00
feat(analytics): refactor and introduce analytics APIs to accommodate OrgLevel, MerchantLevel and ProfileLevel authentication (#5729)
Co-authored-by: hyperswitch-bot[bot] <148525504+hyperswitch-bot[bot]@users.noreply.github.com> Co-authored-by: Sampras Lopes <sampras.lopes@juspay.in>
This commit is contained in:
@ -10,6 +10,8 @@ pub enum AnalyticsError {
|
||||
NotImplemented(&'static str),
|
||||
#[error("Unknown Analytics Error")]
|
||||
UnknownError,
|
||||
#[error("Access Forbidden Analytics Error")]
|
||||
AccessForbiddenError,
|
||||
}
|
||||
|
||||
impl ErrorSwitch<ApiErrorResponse> for AnalyticsError {
|
||||
@ -27,6 +29,9 @@ impl ErrorSwitch<ApiErrorResponse> for AnalyticsError {
|
||||
"Something went wrong",
|
||||
None,
|
||||
)),
|
||||
Self::AccessForbiddenError => {
|
||||
ApiErrorResponse::Unauthorized(ApiError::new("IR", 0, "Access Forbidden", None))
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user