Grails JIRA

  • Log In Access more options
    • Online Help
    • GreenHopper Help
    • Agile Answers
    • Keyboard Shortcuts
    • About JIRA
    • JIRA Credits
    • What’s New
  • Dashboards Access more options (Alt+d)
  • Projects Access more options (Alt+p)
  • Issues Access more options (Alt+i)
  • Agile
Grails
  • Grails
  • GRAILS-9888 REST and URL mapping changes
  • GRAILS-5758

Map exceptions to different response codes.

  • Log In
  • Views
    • XML
    • Word
    • Printable

Details

  • Type: Sub-task Sub-task
  • Status: Open Open
  • Priority: Major Major
  • Resolution: Unresolved
  • Affects Version/s: None
  • Fix Version/s: 2.3-M2
  • Component/s: None
  • Labels:
    None

Description

I have an app that uses a nice url scheme based on product names, so bad URLs are going to happen. There are several actions that require a valid thing but it may not exist. A requirement is to display a nice page, but return a 404. It would be great if I could just throw a MissingThingException and map that to a particular controller/action and have it generate a 404 response.

A possible URL mapping syntax would be...

"404"(controller: "missing", action: "thing", exception: MissingThingException)

The presence of the exception key prevents this from being used as a global mapping for 404s. This should be open for any valid HTTP response code.

Activity

Ascending order - Click to sort in descending order
  • All
  • Comments
  • Work Log
  • History
  • Activity
  • Git Commits
Hide
Permalink
Luke Daley added a comment - 09/Dec/10 2:43 AM

Moving to 1.4 as it is too big to go in the 1.3 line now.

Show
Luke Daley added a comment - 09/Dec/10 2:43 AM Moving to 1.4 as it is too big to go in the 1.3 line now.
Hide
Permalink
Rick Jensen added a comment - 29/Mar/12 8:45 AM

Having exceptions of various types map to response codes is also going to be more important as Grails moves towards better REST support, since proper response code usage is an integral part of a REST architecture.

Show
Rick Jensen added a comment - 29/Mar/12 8:45 AM Having exceptions of various types map to response codes is also going to be more important as Grails moves towards better REST support, since proper response code usage is an integral part of a REST architecture.

People

  • Assignee:
    Jeff Brown
    Reporter:
    Luke Daley
Vote (6)
Watch (7)

Dates

  • Created:
    20/Jan/10 7:29 AM
    Updated:
    Thursday 5:22 PM
    Last Reviewed:
    01/Jan/10

Agile

  • View on Board
  • Atlassian JIRA (v5.2.1#813-sha1:277a546)
  • Report a problem
  • Powered by a free Atlassian JIRA open source license for Grails project. Try JIRA - bug tracking software for your team.