Internal Server Error when service-level token or API key is used for requisition search endpoint

Description

Steps to reproduce:

  1. Generate a service-level token / API key.

  2. Call the requisition search endpoint with the generated token (e.g. /api/requisitions/search?access_token=9a556033-ed13-4dde-9561-158469d15134)

  3. The Internal Server Error is returned:

    Whitelabel Error Page
    This application has no explicit mapping for /error, so you are seeing this as a fallback.

    Thu Apr 25 09:35:39 GMT 2019
    There was an unexpected error (type=Internal Server Error, status=500).
    java.lang.String cannot be cast to java.util.UUID

In demo-v3, in such a situation, an empty list was returned.

Expected results:

  • When a service-level token is used, all requisitions should be returned;

  • When an API key is used, an error message stating that one doesn’t have the permission to call the endpoint should be returned.

Environment

None

Assignee

Unassigned

Reporter

Łukasz Lewczyński

Epic Link

Components

Priority

Major
Configure