Skip to content

Commit

Permalink
Merge pull request #2474 from ASFHyP3/bounds-error-fix
Browse files Browse the repository at this point in the history
Add BoundsValidationError to `post_jobs` Exceptions
  • Loading branch information
AndrewPlayer3 authored Oct 22, 2024
2 parents da772bc + 6fb1c8d commit 7321873
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
4 changes: 2 additions & 2 deletions apps/api/src/hyp3_api/handlers.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import dynamo
from dynamo.exceptions import AccessCodeError, InsufficientCreditsError, UnexpectedApplicationStatusError
from hyp3_api import util
from hyp3_api.validation import GranuleValidationError, validate_jobs
from hyp3_api.validation import BoundsValidationError, GranuleValidationError, validate_jobs


def problem_format(status, message):
Expand All @@ -28,7 +28,7 @@ def post_jobs(body, user):
validate_jobs(body['jobs'])
except requests.HTTPError as e:
print(f'WARN: CMR search failed: {e}')
except GranuleValidationError as e:
except (BoundsValidationError, GranuleValidationError) as e:
abort(problem_format(400, str(e)))

try:
Expand Down
1 change: 0 additions & 1 deletion apps/render_cf.py
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,6 @@ def render_templates(job_types: dict, compute_envs: dict, security_environment:
trim_blocks=True,
lstrip_blocks=True,
keep_trailing_newline=True,
extensions=['jinja2.ext.do'],
)

for template_file in Path('.').glob('**/*.j2'):
Expand Down

0 comments on commit 7321873

Please sign in to comment.