Grails
  1. Grails
  2. GRAILS-3528

Support multiple error code in UrlMappings and provide an error code variable in error handling controller/view

    Details

    • Type: New Feature New Feature
    • Status: Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: 1.0.3
    • Fix Version/s: None
    • Component/s: Configuration
    • Labels:
      None

      Description

      currently, we could do:

      static mappings = {
         "500"(controller:"errors", action:"serverError")
         "404"(controller:"errors", action:"notFound")
         "403"(controller:"errors", action:"forbidden")
      }
      

      it's not the ideal way as if I want to handle from 400 to 417, it will require 18 different entries and 18 view pages (if diff error message will be used). It would be nice if ,

      • in the configuration, it supports all-error or a widecard to map multiple error code
      • in the controller/view, it supplies an errorCode variable

        Activity

        There are no comments yet on this issue.

          People

          • Assignee:
            Unassigned
            Reporter:
            Mingfai Ma
          • Votes:
            4 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Last Reviewed:

              Development