Better messaging for the configurators.
We were generating 500 errors here
This commit is contained in:
parent
7e3c47f8bf
commit
a7fcaac5ef
|
@ -282,7 +282,12 @@ class WorkflowService(object):
|
||||||
|
|
||||||
# jsonify, and de-jsonify the data to mimic how data will be returned from the front end for forms and assures
|
# jsonify, and de-jsonify the data to mimic how data will be returned from the front end for forms and assures
|
||||||
# we aren't generating something that can't be serialized.
|
# we aren't generating something that can't be serialized.
|
||||||
form_data_string = json.dumps(form_data)
|
try:
|
||||||
|
form_data_string = json.dumps(form_data)
|
||||||
|
except TypeError as te:
|
||||||
|
raise ApiError.from_task(code='serialize_error',
|
||||||
|
message=f'Something cannot be serialized. Message is: {te}',
|
||||||
|
task=task)
|
||||||
task.data.update(json.loads(form_data_string))
|
task.data.update(json.loads(form_data_string))
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
|
|
Loading…
Reference in New Issue