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(india): 401 & 403 client error while generating IRN #30757

Merged
merged 1 commit into from
Apr 21, 2022

Conversation

nextchamp-saqib
Copy link
Member

While generating e-invoices, 401 & 403 auth error occurs if auth_token is expired but according to token_expiry, it is still valid.

Solution: Catch 401 & 403 status codes and auto-refresh token once.

@github-actions github-actions bot added the needs-tests This PR needs automated unit-tests. label Apr 20, 2022
@nextchamp-saqib nextchamp-saqib removed the needs-tests This PR needs automated unit-tests. label Apr 20, 2022
@codecov
Copy link

codecov bot commented Apr 20, 2022

Codecov Report

Merging #30757 (ee8047a) into develop (5ac3e7e) will increase coverage by 0.25%.
The diff coverage is 59.57%.

@@             Coverage Diff             @@
##           develop   #30757      +/-   ##
===========================================
+ Coverage    61.34%   61.59%   +0.25%     
===========================================
  Files         1082     1080       -2     
  Lines        69377    69498     +121     
===========================================
+ Hits         42559    42807     +248     
+ Misses       26818    26691     -127     
Impacted Files Coverage Δ
erpnext/regional/india/setup.py 95.28% <ø> (ø)
erpnext/setup/install.py 0.00% <0.00%> (ø)
erpnext/regional/india/e_invoice/utils.py 42.25% <38.09%> (-0.28%) ⬇️
...deferred_accounting/process_deferred_accounting.py 77.77% <50.00%> (ø)
erpnext/controllers/accounts_controller.py 85.15% <90.00%> (+0.11%) ⬆️
erpnext/accounts/deferred_revenue.py 75.00% <100.00%> (-0.75%) ⬇️
...cy_exchange_settings/currency_exchange_settings.py 58.00% <100.00%> (-5.47%) ⬇️
erpnext/controllers/taxes_and_totals.py 97.54% <100.00%> (+<0.01%) ⬆️
...ext/manufacturing/doctype/work_order/work_order.py 78.31% <100.00%> (ø)
erpnext/regional/india/utils.py 64.86% <100.00%> (ø)
... and 76 more

@deepeshgarg007 deepeshgarg007 merged commit 81b3342 into frappe:develop Apr 21, 2022
deepeshgarg007 added a commit that referenced this pull request Apr 22, 2022
…-30757

fix(india): 401 & 403 client error while generating IRN (backport #30757)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants