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

Handle error 3001 : Requested data is not available in fetch gstin status api #2640

Open
ljain112 opened this issue Sep 25, 2024 — with Huly for GitHub · 0 comments · May be fixed by #2645
Open

Handle error 3001 : Requested data is not available in fetch gstin status api #2640

ljain112 opened this issue Sep 25, 2024 — with Huly for GitHub · 0 comments · May be fixed by #2645

Comments

Copy link
Collaborator

ljain112 commented Sep 25, 2024

url = https://asp.resilient.tech/ei/api/master/gstin
gstin = 24AQTPC8950E1ZO

{
    "message": "3001 : Requested data is not available",
    "success": false
}
Traceback (most recent call last):
  File "apps/india_compliance/india_compliance/gst_india/utils/gstin_info.py", line 202, in fetch_gstin_status
    response = EInvoiceAPI(company_gstin=company_gstin).get_gstin_info(gstin)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "apps/india_compliance/india_compliance/gst_india/api_classes/e_invoice.py", line 111, in get_gstin_info
    return self.get(endpoint="master/gstin", params={"gstin": gstin})
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "apps/india_compliance/india_compliance/gst_india/api_classes/base.py", line 83, in get
    return self._make_request("GET", *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "apps/india_compliance/india_compliance/gst_india/api_classes/base.py", line 170, in _make_request
    raise e
  File "apps/india_compliance/india_compliance/gst_india/api_classes/base.py", line 161, in _make_request
    response_json = self.process_response(response_json)
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "apps/india_compliance/india_compliance/gst_india/api_classes/base.py", line 191, in process_response
    self.handle_error_response(response)
  File "apps/india_compliance/india_compliance/gst_india/api_classes/base.py", line 205, in handle_error_response
    frappe.throw(
  File "apps/frappe/frappe/__init__.py", line 548, in throw
    msgprint(
  File "apps/frappe/frappe/__init__.py", line 509, in msgprint
    _raise_exception()
  File "apps/frappe/frappe/__init__.py", line 455, in _raise_exception
    raise raise_exception(msg)
frappe.exceptions.ValidationError: 3001 : Requested data is not available

Huly®: IC-2763

@ljain112 ljain112 changed the title Handle error 3001 : Requested data is not available in fetch gstin status api Handle error 3001 : Requested data is not available in fetch gstin status api Sep 25, 2024
@Sanket322 Sanket322 linked a pull request Sep 30, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant