Added extra log in case of generic errors
in update answers
This commit is contained in:
parent
0d6789d307
commit
938bc68383
10
ext.py
10
ext.py
|
@ -222,9 +222,13 @@ class Order:
|
||||||
res = await pretixClient.patch(f'orderpositions/{self.position_id}/', json={'answers': self.answers}, expectedStatusCodes=None)
|
res = await pretixClient.patch(f'orderpositions/{self.position_id}/', json={'answers': self.answers}, expectedStatusCodes=None)
|
||||||
|
|
||||||
if res.status_code != 200:
|
if res.status_code != 200:
|
||||||
for ans, err in zip(self.answers, res.json()['answers']):
|
e = res.json()
|
||||||
if err:
|
if "answers" in e:
|
||||||
logger.error ('[ANSWERS SENDING] ERROR ON %s %s', ans, err)
|
for ans, err in zip(self.answers, res.json()['answers']):
|
||||||
|
if err:
|
||||||
|
logger.error ('[ANSWERS SENDING] ERROR ON %s %s', ans, err)
|
||||||
|
else:
|
||||||
|
logger.error("[ANSWERS SENDING] GENERIC ERROR. Response: '%s'", str(e))
|
||||||
|
|
||||||
raise exceptions.ServerError('There has been an error while updating this answers.')
|
raise exceptions.ServerError('There has been an error while updating this answers.')
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue