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

Update request with invalid json gives a stack trace

    XMLWordPrintable

Details

    • Story
    • Status: Closed (View Workflow)
    • P3
    • Resolution: Won't Do
    • None
    • 1.3.0

    Description

      PUT request to /eholdings/providers/18 with the body below (invalid json) gives a 400 but with a stack trace instead of a handled error message:

      {
        "data": {
          "type": "providers",
          "attributes": {
            "providerToken": {
              "value": "hello test token"
            },
            "proxy": {
              "id": "<n>"
            },
          }
        }
      }
      

      PUT request to /eholdings/resources with invalid JSON also gives a 400 with a similar body containing a stack trace such as below (instead of a standard error response)

      {
          "status": 400,
          "error": "Bad Request",
          "exception": "#<ActionDispatch::Http::Parameters::ParseError: 765: unexpected token at '{\n  \"data\": {\n    \"type\": \"resources\",\n    \"attributes\": {\n      \"isSelected\": false,\n      \"visibilityData\": null,\n      },\n      \"customEmbargoPeriod\": null,\n      \"customCoverages\" : [\n      {\n      \"beginCoverage\" : \"2001-01-02\"\n      }\n      ]\n    }\n  }\n}'>",
          "traces": {
              "Application Trace": ...
                    
      

      TestRail: Results

        Attachments

          Activity

            People

              Unassigned Unassigned
              sduvvuri Sobha Duvvuri
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                TestRail: Runs

                  TestRail: Cases