View | Details | Raw Unified | Return to bug 37963
Collapse All | Expand All

(-)a/Koha/ERM/EUsage/UsageDataProvider.pm (-4 / +7 lines)
Lines 458-469 Additionally, adds background job report message(s) if that is the case Link Here
458
sub _sushi_errors {
458
sub _sushi_errors {
459
    my ( $self, $decoded_response ) = @_;
459
    my ( $self, $decoded_response ) = @_;
460
460
461
    if ( $decoded_response->{Severity} ) {
461
    my $severity = $decoded_response->{Severity} // $decoded_response->{severity};
462
    my $message = $decoded_response->{Message} // $decoded_response->{message};
463
    my $code = $decoded_response->{Code} // $decoded_response->{code};
464
465
    if ( $severity ) {
462
        $self->{job_callbacks}->{add_message_callback}->(
466
        $self->{job_callbacks}->{add_message_callback}->(
463
            {
467
            {
464
                type    => 'error',
468
                type    => 'error',
465
                code    => $decoded_response->{Code},
469
                code    => $code,
466
                message => $decoded_response->{Severity} . ' - ' . $decoded_response->{Message},
470
                message => $severity . ' - ' . $message,
467
            }
471
            }
468
        ) if $self->{job_callbacks};
472
        ) if $self->{job_callbacks};
469
        return 1;
473
        return 1;
470
- 

Return to bug 37963