Skip to content

Commit

Permalink
Merge pull request os-autoinst#6030 from perlpunk/error-message
Browse files Browse the repository at this point in the history
Slightly improve error handling
  • Loading branch information
mergify[bot] authored Oct 29, 2024
2 parents 7512a62 + 87b7930 commit 7e0d08d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/OpenQA/WebAPI/Plugin/AMQP.pm
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,8 @@ sub on_job_event {

my ($user_id, $connection_id, $event, $event_data) = @$args;
my $jobs = $self->{app}->schema->resultset('Jobs');
my $job = $jobs->find({id => $event_data->{id}});
my $job = $jobs->find({id => $event_data->{id}})
or die "Could not find job '$event_data->{id}' in database";

# find count of pending jobs for the same build to know whether all tests for a build are done
$event_data->{remaining} = $jobs->search(
Expand Down

0 comments on commit 7e0d08d

Please sign in to comment.