Bug 804018 - Return after delete an app should not cause exception.
Summary: Return after delete an app should not cause exception.
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: OKD
Classification: Red Hat
Component: Website
Version: 2.x
Hardware: Unspecified
OS: Unspecified
low
low
Target Milestone: ---
: ---
Assignee: Clayton Coleman
QA Contact: libra bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-03-16 10:31 UTC by Yujie Zhang
Modified: 2015-05-15 01:06 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-04-27 20:46:21 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Yujie Zhang 2012-03-16 10:31:30 UTC
Description of problem:

Return and delete after delete an app should not cause exception.

Version-Release number of selected component (if applicable):

devenv_stage_144

How reproducible:always


Steps to Reproduce:
1.Go to openshift website and login
2.Create an app and delete this app
3.Click return of the browser and click the delete button on the page again
  
Actual results:

It will cause the following error:

ActiveResource::ResourceNotFound in ApplicationsController#destroy

Failed.  Response code = 404.  Response message = Not Found.

Rails.root: /var/www/stickshift/site
Application Trace | Framework Trace | Full Trace

app/models/rest_api/base.rb:537:in `get'
app/models/rest_api/base.rb:537:in `get'
app/models/rest_api/base.rb:418:in `find_single'
app/models/rest_api/base.rb:283:in `find'
app/models/domain.rb:31:in `find_application'
app/controllers/applications_controller.rb:85:in `destroy'


Expected results:

There should be remind message, not exception.

Additional info:

Comment 1 Clayton Coleman 2012-03-16 16:10:31 UTC
In production this should display the standard 404 page - which is what I would expect if the app was deleted (just like if i followed the link in).

There's not much we can do here because the browser is caching that previous page, not us.

Would a better 404 page for apps satisfy your concerns?

Comment 2 Xiaoli Tian 2012-03-17 02:53:07 UTC
(In reply to comment #1)
> In production this should display the standard 404 page - which is what I would
> expect if the app was deleted (just like if i followed the link in).
> 
> There's not much we can do here because the browser is caching that previous
> page, not us.
> 
> Would a better 404 page for apps satisfy your concerns?

Yes, Return 404 is better than code exceptions.

Thanks

Comment 3 Yujie Zhang 2012-03-20 06:32:59 UTC
Test this issue on stage, will not return 404 code exception, but error message which says "We're sorry, but something went wrong.We've been notified about this issue and we'll take a look at it shortly." Is this expected ?

Comment 4 Clayton Coleman 2012-03-20 16:46:29 UTC
Hrm, I would have expected the 404 page to show up.  I'll dig into it on stage.

Comment 5 Clayton Coleman 2012-03-23 22:52:06 UTC
Probably need a generic rescue_from for ActiveResource::ResourceNotFound that sets 404 correctly.

Comment 6 Clayton Coleman 2012-04-10 22:57:38 UTC
All pages should display the generic 404 in dev mode and in production mode.  Eventually we may want to revert this for debugging purposes in dev mode.

Comment 7 Yujie Zhang 2012-04-27 06:07:49 UTC
Tested this issue on stage, it will return "Page not found" message, so verify this bug.

Comment 8 Yujie Zhang 2012-04-27 06:08:11 UTC
Tested this issue on stage, it will return "Page not found" message, so verify this bug.


Note You need to log in before you can comment on or make changes to this bug.