Uploaded image for project: 'mod-configuration'
  1. mod-configuration
  2. MODCONF-35

PUT return 500 on entity not found

    XMLWordPrintable

Details

    • CP: sprint 76
    • 2
    • Core: Platform

    Description

      Overview
      PUT /configuration/entries returns a 500 instead of 404

      However, the API documentation(https://s3.amazonaws.com/foliodocs/api/mod-configuration/config.html#configurations_entries__entryid__put) lists a 404 if a UUID is not found on performing a PUT, this is also the standard followed at FOLIO level.

      curl -X PUT \
        https://folio-testing-okapi.aws.indexdata.com:443/configurations/entries/b873eb5a-7a50-488a-9624-d4fbc4daad51 \
        -H 'x-okapi-tenant: diku' \
        -H 'x-okapi-token: $OKAPITOKEN' \
        -d '{
          "id": "b873eb5a-7a50-488a-9624-d4fbc4daad51",
           "module": "SETTINGS",
           "configName": "locale",
           "code": "system.currency_code.dk",
           "description": "currency",
           "default": false,
           "enabled": true,
           "value": "DKK"
      }'
      

      RESPONSE
      500 internal server error
      No records match the query, no records updated

      NOTE: May also make sense to use PgUtil while correcting this and upgrade the RMB to latest version
      Acceptance Criteria

      • PUT returns a 404 if item is not found during update
      • Remove the withPostOnly method used as a workaround, and also correct/add unit tests

      TestRail: Results

        Attachments

          Issue Links

            Activity

              People

                adam Adam Dickmeiss
                KVupp Kruthi Vuppala
                Votes:
                1 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                  Created:
                  Updated:
                  Resolved:

                  TestRail: Runs

                    TestRail: Cases