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

  • All
  • Comments
  • Work Log
  • History
  • Activity
  • Git Commits
There are no git log entries for this issue yet.

People

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

Dates

  • Created:
    20/Jan/10 7:29 AM
    Updated:
    09/May/13 8:25 AM
    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.