mirror of
https://github.com/juspay/hyperswitch.git
synced 2025-11-03 13:30:39 +08:00
feat(api_event_errors): error field in APIEvents (#2808)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: harsh-sharma-juspay <125131007+harsh-sharma-juspay@users.noreply.github.com>
This commit is contained in:
@ -36,6 +36,7 @@ pub struct ApiEvent {
|
||||
ip_addr: Option<String>,
|
||||
url_path: String,
|
||||
response: Option<serde_json::Value>,
|
||||
error: Option<serde_json::Value>,
|
||||
#[serde(flatten)]
|
||||
event_type: ApiEventsType,
|
||||
hs_latency: Option<u128>,
|
||||
@ -52,6 +53,7 @@ impl ApiEvent {
|
||||
response: Option<serde_json::Value>,
|
||||
hs_latency: Option<u128>,
|
||||
auth_type: AuthenticationType,
|
||||
error: Option<serde_json::Value>,
|
||||
event_type: ApiEventsType,
|
||||
http_req: &HttpRequest,
|
||||
) -> Self {
|
||||
@ -64,6 +66,7 @@ impl ApiEvent {
|
||||
request,
|
||||
response,
|
||||
auth_type,
|
||||
error,
|
||||
ip_addr: http_req
|
||||
.connection_info()
|
||||
.realip_remote_addr()
|
||||
|
||||
Reference in New Issue
Block a user