POST /jobs
internal server error if validator references unspecified optional parameter
#2516
Labels
Jira Bug
Create a Jira Bug for this issue
Jira: https://asfdaac.atlassian.net/browse/TOOL-3335
Note: The above link is accessible only to members of ASF.
The
POST /jobs
endpoint returns an internal server error if a validator attempts to reference an optional job parameter that was not provided. For example, this can be reproduced by attempting to submit eitherSRG_GSLC
orSRG_TIME_SERIES
without the optionalbounds
parameter. Here's an example payload that should validate successfully:and here's the same payload without
bounds
, which should return a500
error:The API Lambda logs show:
The problem is that the
post_jobs
handler inhandlers.py
callsvalidate_jobs
before callingdynamo.jobs.put_jobs
, which is responsible for populating default parameter values (seejobs.py
). The fix might be as simple as callingvalidate_jobs
on the prepared jobs indynamo.jobs.put_jobs
before writing them to the database.This could potentially affect any job type, but after reviewing
validation.py
, I'm not seeing any other job types that would currently be affected, so this should only affect the LAVAS deployments right now.The text was updated successfully, but these errors were encountered: