Uploaded image for project: 'ui-eholdings'
  1. ui-eholdings
  2. UIEH-575

PUT Configuration -- Issues with Error Response

    XMLWordPrintable

    Details

    • Type: Story
    • Status: Closed (View Workflow)
    • Priority: P3
    • Resolution: Done
    • Affects Version/s: None
    • Fix Version/s: None
    • Labels:
    • Template:
    • Sprint:
      eHoldings Sprint 52
    • Story Points:
      1

      Description

      While writing API Tests for PUT Configuration request, encountered the following issues with error handling;

      (1) A PUT request with missing attributes returns correct 422 response – however the error response body does not validate against schema and is missing title attribute. Sample request and response below.

      {
          "data": {
              "id": "configuration",
              "type": "configurations",
              "attributes": {
                  "customerId": "apidvcorp"
              }
          }
      }
      
      {
          "errors": [
              {
                  "message": "may not be null",
                  "type": "1",
                  "code": "-1",
                  "parameters": [
                      {
                          "key": "data.attributes.apiKey",
                          "value": "null"
                      }
                  ]
              },
              {
                  "message": "may not be null",
                  "type": "1",
                  "code": "-1",
                  "parameters": [
                      {
                          "key": "data.attributes.rmapiBaseUrl",
                          "value": "null"
                      }
                  ]
              }
          ]
      }
      

      (2) A PUT request with either an invalid or empty rmapiBaseUrl returns a 500 response with body message `Internal server error'

      {
      "data": {
      "id": "configuration",
      "type": "configurations",
      "attributes":

      { "customerId": "test", "apiKey": "test", "rmapiBaseUrl": "" }

      }
      }

        TestRail: Results

          Attachments

            Activity

              People

              Assignee:
              andrii.paias Andrii Paias
              Reporter:
              cgodfrey Carole Godfrey
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  TestRail: Runs

                    TestRail: Cases