Got an email from a user with a '502' error > ...
# support
t
Got an email from a user with a '502' error
From: MGKReddy
Email: m.gopalkrishnareddy2@gmail.com
Getting the following error while using TimeGPT for forecasting: nixtla.core.api_error.ApiError: status_code: 502, body: {'status': 502, 'data': None, 'message': 'Request failed with status code 502', 'code': 'B30', 'support': 'If you have questions or need support, please email ops@nixtla.io sharing this response and ID: JKL68QH355', 'requestID': 'JKL68QH355'}, seeking your assistance.
1
m
Usually, retrying (running the code again) fixes this issue, but surely someone has a smarter answer than me 😛
1
e
@Marco @José Morales maybe you can put the logic to just retry the call when a 502 happens? I can do that in the middleware but not sure that’s the right place for it
j
I think it's best in the middleware, since those come from modal and all calls to modal will pass through the middleware. For the azure deployment they won't go through the middleware nor modal, and that may return 502 as well for different reasons
t
Thanks, and for now, just ask the user to try again?
👍 1
j
Yes, retrying should work
👍 1