Skip to content

v1.4.10

Latest

Choose a tag to compare

@ankitdas13 ankitdas13 released this 29 Jul 11:02
ad9ab7b

cc4732f feat: expose structured API error data in RazorpayException

  • ApiClient now parses the API error body and attaches it to the exception, so callers no longer need to parse the response themselves
  • New getters on RazorpayException: getCode(), getDescription(), getField(), getReason(), getSource(), getStep(), getMetadata(), and getErrorResponse() for the full error JSON
  • getStatusCode() returns the HTTP status code from the failed response
  • Backwards compatible: existing constructors and getMessage() behavior are unchanged