Skip to content

Commit

Permalink
frontend: re-raise errors to API instead of passing null
Browse files Browse the repository at this point in the history
get_build_record and get_srpm_build_record methods returns
None in case of exception or empty task which results in
null response in API endpoints. Backend worker
don't expect null value, tries to unpack it and fails.
Re-raising the error will let know backend that something
went off
  • Loading branch information
nikromen committed Sep 19, 2023
1 parent 4906e2d commit 739a530
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ def get_build_record(task, for_backend=False):

except Exception as err:
app.logger.exception(err)
return None
raise err

return build_record

Expand Down Expand Up @@ -237,7 +237,7 @@ def get_srpm_build_record(task, for_backend=False):

except Exception as err:
app.logger.exception(err)
return None
raise err

return build_record

Expand Down

0 comments on commit 739a530

Please sign in to comment.