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

(-)a/Koha/ERM/Providers/EBSCO.pm (+2 lines)
Lines 277-282 sub request { Link Here
277
            Koha::Exceptions::ObjectNotFound->throw($message);
277
            Koha::Exceptions::ObjectNotFound->throw($message);
278
        } elsif ( $response->code == 401 ) {
278
        } elsif ( $response->code == 401 ) {
279
            Koha::Exceptions::Authorization::Unauthorized->throw($message);
279
            Koha::Exceptions::Authorization::Unauthorized->throw($message);
280
        } elsif ( $response->code == 415 ) {
281
            Koha::Exceptions::UnsupportedMediaType->throw($message);
280
        } else {
282
        } else {
281
            die sprintf "ERROR requesting EBSCO API\n%s\ncode %s: %s\n", $url, $response->code,
283
            die sprintf "ERROR requesting EBSCO API\n%s\ncode %s: %s\n", $url, $response->code,
282
              $message;
284
              $message;
(-)a/Koha/REST/V1/ERM/EHoldings/Packages/EBSCO.pm (-1 / +6 lines)
Lines 151-157 sub edit { Link Here
151
                        status  => 404,
151
                        status  => 404,
152
                        openapi => { error => $_->error }
152
                        openapi => { error => $_->error }
153
                    );
153
                    );
154
154
                }
155
                if ( $_->isa('Koha::Exceptions::UnsupportedMediaType') ) {
156
                    return $c->render(
157
                        status  => 415,
158
                        openapi => { error => $_->error }
159
                    );
155
                }
160
                }
156
            }
161
            }
157
162
(-)a/api/v1/swagger/paths/erm_eholdings_packages.yaml (-1 / +4 lines)
Lines 391-396 Link Here
391
        description: Package not found
391
        description: Package not found
392
        schema:
392
        schema:
393
          $ref: "../swagger.yaml#/definitions/error"
393
          $ref: "../swagger.yaml#/definitions/error"
394
      415:
395
        description: Unsupported Media Type
396
        schema:
397
          $ref: "../swagger.yaml#/definitions/error"
394
      500:
398
      500:
395
        description: |-
399
        description: |-
396
          Internal server error. Possible `error_code` attribute values:
400
          Internal server error. Possible `error_code` attribute values:
397
- 

Return to bug 33482