Uploaded image for project: 'Policy Framework'
  1. Policy Framework
  2. POLICY-1725

XACML PDP returns 500 vs 400 for bad syntax JSON

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Medium Medium
    • El Alto Release
    • Dublin Release, El Alto Release
    • None

      When sending a JSON that is missing a comma, eg bad syntax, the decision api returned 500. Should return 400 and/or error response object.

       

      500 Request failed. HTTP/1.1

      Date: Thu, 02 May 2019 10:48:50 GMT

      Cache-Control: must-revalidate,no-cache,no-store

      ......

      ......

      [2019-05-02T11:38:52.811+00:00|WARN|HttpChannel|qtp298430307-25] /policy/pdpx/v1/decision com.google.gson.stream.MalformedJsonException: Unterminated object at line 1 column 223 path $.resource.

      [2019-05-02T11:38:52.812+00:00|DEBUG|HttpChannel|qtp298430307-25] /policy/pdpx/v1/decision

      javax.servlet.ServletException: com.google.gson.JsonSyntaxException: com.google.gson.stream.MalformedJsonException: Unterminated object at line 1 column 223 path $.resource.

      at org.glassfish.jersey.servlet.WebComponent.serviceImpl(WebComponent.java:489)

            jrh3 jrh3
            pdragosh pdragosh
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: