Bug 804018 - Return after delete an app should not cause exception.
Return after delete an app should not cause exception.
Status: CLOSED CURRENTRELEASE
Product: OpenShift Origin
Classification: Red Hat
Component: Website (Show other bugs)
2.x
Unspecified Unspecified
low Severity low
: ---
: ---
Assigned To: Clayton Coleman
libra bugs
: Triaged
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-03-16 06:31 EDT by Yujie Zhang
Modified: 2015-05-14 21:06 EDT (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2012-04-27 16:46:21 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Yujie Zhang 2012-03-16 06:31:30 EDT
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 12:10:31 EDT
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-16 22:53:07 EDT
(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 02:32:59 EDT
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 12:46:29 EDT
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 18:52:06 EDT
Probably need a generic rescue_from for ActiveResource::ResourceNotFound that sets 404 correctly.
Comment 6 Clayton Coleman 2012-04-10 18:57:38 EDT
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 02:07:49 EDT
Tested this issue on stage, it will return "Page not found" message, so verify this bug.
Comment 8 Yujie Zhang 2012-04-27 02:08:11 EDT
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.