question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Unable to get failure response while integrating with the library

See original GitHub issue

Hi, I am using the latest version of this library (2.2.9) and it’s working fine for success response. But I’m not getting any response for failure case like wrong upi (eg: failure@razorpay).

If the payment is success, I’m getting success logger which is data in below. If the payment is failure, I’m not getting any logger, just giving payment failure from the gateway in UI. But nothing in logger which I’m calling.

Below is my razor pay integration,

const handleRazorPay = (response) =>{ try { var options = { description: ‘Credits towards consultation’, image: ‘https://i.imgur.com/3g7nmJC.png’, currency: response.currency, key: response.merchant_key, amount: response.amount, name: response.name, order_id: response.order_id, prefill: { email: response.email, contact: response.number, name: ‘Razorpay Software’, }, theme: {color: ‘#F37254’}, }; console.log('options:: ', options); RazorpayCheckout.open(options) .then(data => { console.log('data:: ', data); alert(‘success’); }) .catch(error => { // handle failure console.log( Error Payment cancelled ${error.code} | ${error.description}, ); console.log('Error data:: ', error); }); } catch (error) { console.log('Error in rendering payment gateway:: ', error.message); } }

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
vivekshindhecommented, Sep 6, 2022

@gani419 ack. Checking it. Will notify ASAP

0reactions
gani419commented, Sep 8, 2022

Thank you for your response…

Read more comments on GitHub >

github_iconTop Results From Across the Web

Handling operation errors - Apollo GraphQL Docs
Apollo Client can encounter a variety of errors when executing operations on your GraphQL ... Example error response ... "message": "Failed to get...
Read more >
Retrofit 2 — Simple Error Handling - Future Studio
While using parseError() I get an EOFException on error = converter.convert(response.errorBody()); I'm putting my error below and I don't think ...
Read more >
Error handling library for Spring Boot - Wim Deblauwe
We can see that the problem during the linking was the information request. With just the 404 NOT FOUND response code, we do...
Read more >
Best Practices for REST API Error Handling - Baeldung
Here are some common response codes: 400 Bad Request – client sent an invalid request, such as lacking required request body or parameter;...
Read more >
Error Handling In Rust - A Deep Dive - A learning journal
If the query fails, we grab the error and emit a log event. We can then go and inspect the error logs when...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found