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:
ivor-juspay
2023-11-22 12:55:51 +05:30
committed by GitHub
parent c6a5a85748
commit ce10579a72
4 changed files with 23 additions and 4 deletions

View File

@ -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()