Grails
  1. Grails
  2. GRAILS-11036

DefaultJsonRenderer not rendering error when An error occurred parsing the body of the request

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.3.4
    • Fix Version/s: 2.3.8
    • Component/s: REST
    • Labels:
      None

      Description

      Invalid Json input is like:

      { "class":"Person" "name":"value"1234 }

      PersonController extends RestfulController<Person>{
      register() {
      Person person = Person.createInstance(params)
      if (person.hasErrors)

      { respond person return }

      .....
      }
      }

      the json respond is:
      error[0]

        Activity

        Hide
        yong cheng added a comment -

        org.springframework.validation.FieldError works well.

        Only failed when facing
        org.springframework.validation.ObjectError

        Show
        yong cheng added a comment - org.springframework.validation.FieldError works well. Only failed when facing org.springframework.validation.ObjectError

          People

          • Assignee:
            Graeme Rocher
            Reporter:
            yong cheng
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development