Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(analytics): fixed response code to 501 #3119

Merged
merged 4 commits into from
Jan 5, 2024

Conversation

sagarnaikjuspay
Copy link
Contributor

@sagarnaikjuspay sagarnaikjuspay commented Dec 12, 2023

Type of Change

  • Bugfix
  • New feature
  • Enhancement
  • Refactoring
  • Dependency updates
  • Documentation
  • CI/CD

Description

  • use the errorswitch trait to propogate errors in analytics
  • used http::method for incoming api events
  • updated the error propogation mapping to propogate not implemented

Additional Changes

  • This PR modifies the API contract
  • This PR modifies the database schema
  • This PR modifies application configuration/environment variables

Motivation and Context

How did you test it?

change the events source to logs in place of kafka in development.toml
Screenshot 2024-01-10 at 3 43 19 PM

curl 'https://sandbox.hyperswitch.io/analytics/v1/api_event_logs?type=Payment&payment_id=<>'
-H 'sec-ch-ua: "Not_A Brand";v="8", "Chromium";v="120", "Google Chrome";v="120"'
-H 'sec-ch-ua-mobile: ?0'
-H 'Authorization: '
-H 'User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36'
-H 'Content-Type: application/json'
-H 'Referer: https://app.hyperswitch.io/'
-H 'api-key: hyperswitch'
-H 'sec-ch-ua-platform: "macOS"'
--compressed

enable sqlx analytics and go to audit logs and u should get 501 error in dev tools
image
Screenshot 2023-12-12 at 8 40 38 PM

Checklist

  • I formatted the code cargo +nightly fmt --all
  • I addressed lints thrown by cargo clippy
  • I reviewed the submitted code
  • I added unit tests for my changes where possible
  • I added a CHANGELOG entry if applicable

@sagarnaikjuspay sagarnaikjuspay added C-bug Category: Bug S-waiting-on-approval Status: Review completed, awaiting for approvals from code-owners labels Dec 12, 2023
@sagarnaikjuspay sagarnaikjuspay self-assigned this Dec 12, 2023
@sagarnaikjuspay sagarnaikjuspay requested review from a team as code owners December 12, 2023 15:13
@ironman-gampala
Copy link

@sagarnaikjuspay can you handle the same in the UI where if you get 501 for api_events as well as sdk_events, hiding the events and logs?

@sagarnaikjuspay sagarnaikjuspay removed the S-waiting-on-approval Status: Review completed, awaiting for approvals from code-owners label Dec 13, 2023
@Gnanasundari24 Gnanasundari24 added this pull request to the merge queue Jan 5, 2024
Merged via the queue into main with commit 00008c1 Jan 5, 2024
@Gnanasundari24 Gnanasundari24 deleted the fix_status_code_for_not_implemented_analytics branch January 5, 2024 13:42
pixincreate added a commit that referenced this pull request Jan 8, 2024
* 'main' of github.com:juspay/hyperswitch:
  fix(connector): [Stripe] Deserialization Error while parsing Dispute Webhook Body (#3256)
  refactor(euclid_wasm): Update wasm config (#3222)
  fix(analytics): added response to the connector outgoing event (#3129)
  fix(analytics): fixed response code to 501 (#3119)
  fix(connector): [NMI] Populating `ErrorResponse` with required fields and Mapping `connector_response_reference_id` (#3214)
  feat(merchant_account): Add list multiple merchants in `MerchantAccountInterface` (#3220)
  feat: include version number in response headers and on application startup (#3045)
  chore: address Rust 1.75 clippy lints (#3231)
  feat: add deep health check (#3210)
  feat(analytics): adding outgoing webhooks kafka event (#3140)
  refactor: address panics due to indexing and slicing (#3233)
  fix(users): Fix wrong redirection url in magic link (#3217)
  fix(user): add integration_completed enum in metadata type (#3245)
  chore(version): v1.106.1
  fix(connector): [iatapay] change refund amount (#3244)
  chore(version): v1.106.0
  test(postman): update postman collection files
  fix(core): fix recurring mandates flow for cyber source (#3224)
  chore: fix channel handling for consumer workflow loop (#3223)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: Bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants