mirror of
https://github.com/EDCD/EDMarketConnector.git
synced 2025-04-14 00:07:14 +03:00
Treat return code 5xx as successfully sent
This commit is contained in:
parent
61aab83244
commit
ba4809942a
@ -295,7 +295,8 @@ def worker():
|
||||
r.raise_for_status()
|
||||
reply = r.json()
|
||||
(msgnum, msg) = reply['msgnum'], reply['msg']
|
||||
if msgnum // 100 != 1: # 1xx == OK
|
||||
# 1xx = OK, 2xx = fatal error, 3&4xx not generated at top-level, 5xx = error but events saved for later processing
|
||||
if msgnum // 100 == 2:
|
||||
print('EDSM\t%s %s\t%s' % (msgnum, msg, json.dumps(pending, separators = (',', ': '))))
|
||||
plug.show_error(_('Error: EDSM {MSG}').format(MSG=msg))
|
||||
else:
|
||||
|
Loading…
x
Reference in New Issue
Block a user