File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -30,11 +30,17 @@ def decorator(f):
3030 def decorated_function (* args , ** kwargs ):
3131 if not request .json :
3232 return jsonify ({"message" : "Missing JSON in request" }), 400
33+
34+ # Create a copy of the request data and remove internal _cloud_job_id field
35+ # to prevent validation errors while preserving it for cloud job processing
36+ validation_data = request .json .copy ()
37+ validation_data .pop ('_cloud_job_id' , None )
38+
3339 try :
34- jsonschema .validate (instance = request . json , schema = schema )
40+ jsonschema .validate (instance = validation_data , schema = schema )
3541 except jsonschema .exceptions .ValidationError as validation_error :
3642 return jsonify ({"message" : f"Invalid payload: { validation_error .message } " }), 400
37-
43+
3844 return f (* args , ** kwargs )
3945 return decorated_function
4046 return decorator
You can’t perform that action at this time.
0 commit comments