Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Server error or downtime #20

Closed
shawndrost opened this issue Jun 25, 2012 · 1 comment
Closed

Server error or downtime #20

shawndrost opened this issue Jun 25, 2012 · 1 comment

Comments

@shawndrost
Copy link

Heads up: a vanilla upload in a previously-working spec started throwing the below exception. It'd be nice if the gem threw a more descriptive/concise/recoverable exception. Also, have you considered a status page?

 RuntimeError:
   Error parsing server response (500) - <!DOCTYPE html>
   <html>
   <head>
     <title>We're sorry, but something went wrong (500)</title>
     <style type="text/css">
       body { background-color: #fff; color: #666; text-align: center; font-family: arial, sans-serif; }
       div.dialog {
         width: 25em;
         padding: 0 4em;
         margin: 4em auto 0 auto;
         border: 1px solid #ccc;
         border-right-color: #999;
         border-bottom-color: #999;
       }
       h1 { font-size: 100%; color: #f00; line-height: 1.5em; }
     </style>
   </head>

   <body>
     <!-- This file lives in public/500.html -->
     <div class="dialog">
       <h1>We're sorry, but something went wrong.</h1>
       <p>We've been notified about this issue and we'll take a look at it shortly.</p>
     </div>
   </body>
   </html>
   . Got - 757: unexpected token at '<!DOCTYPE html>
   <html>
   <head>
     <title>We're sorry, but something went wrong (500)</title>
     <style type="text/css">
       body { background-color: #fff; color: #666; text-align: center; font-family: arial, sans-serif; }
       div.dialog {
         width: 25em;
         padding: 0 4em;
         margin: 4em auto 0 auto;
         border: 1px solid #ccc;
         border-right-color: #999;
         border-bottom-color: #999;
       }
       h1 { font-size: 100%; color: #f00; line-height: 1.5em; }
     </style>
   </head>

   <body>
     <!-- This file lives in public/500.html -->
     <div class="dialog">
       <h1>We're sorry, but something went wrong.</h1>
       <p>We've been notified about this issue and we'll take a look at it shortly.</p>
     </div>
   </body>
   </html>
   '
 # /Users/shawndrost/.rvm/gems/ruby-1.9.3-p125@hb_server/gems/cloudinary-1.0.22/lib/cloudinary/uploader.rb:129:in `rescue in block in call_api'

 # /Users/shawndrost/.rvm/gems/ruby-1.9.3-p125@hb_server/gems/cloudinary-1.0.22/lib/cloudinary/uploader.rb:125:in `block in call_api'
 # /Users/shawndrost/.rvm/gems/ruby-1.9.3-p125@hb_server/gems/rest-client-1.6.7/lib/restclient/request.rb:228:in `call'
 # /Users/shawndrost/.rvm/gems/ruby-1.9.3-p125@hb_server/gems/rest-client-1.6.7/lib/restclient/request.rb:228:in `process_result'
 # /Users/shawndrost/.rvm/gems/ruby-1.9.3-p125@hb_server/gems/rest-client-1.6.7/lib/restclient/request.rb:178:in `block in transmit'
 # /Users/shawndrost/.rvm/rubies/ruby-1.9.3-p125/lib/ruby/1.9.1/net/http.rb:745:in `start'
 # /Users/shawndrost/.rvm/gems/ruby-1.9.3-p125@hb_server/gems/rest-client-1.6.7/lib/restclient/request.rb:172:in `transmit'
 # /Users/shawndrost/.rvm/gems/ruby-1.9.3-p125@hb_server/gems/rest-client-1.6.7/lib/restclient/request.rb:64:in `execute'
 # /Users/shawndrost/.rvm/gems/ruby-1.9.3-p125@hb_server/gems/rest-client-1.6.7/lib/restclient/request.rb:33:in `execute'
 # /Users/shawndrost/.rvm/gems/ruby-1.9.3-p125@hb_server/gems/cloudinary-1.0.22/lib/cloudinary/uploader.rb:121:in `call_api'
 # /Users/shawndrost/.rvm/gems/ruby-1.9.3-p125@hb_server/gems/cloudinary-1.0.22/lib/cloudinary/uploader.rb:27:in `upload'
 # /Users/shawndrost/.rvm/gems/ruby-1.9.3-p125@hb_server/gems/cloudinary-1.0.22/lib/cloudinary/carrier_wave/storage.rb:26:in `store!'
 # /Users/shawndrost/.rvm/gems/ruby-1.9.3-p125@hb_server/gems/carrierwave-0.6.2/lib/carrierwave/uploader/store.rb:59:in `block in store!'
 # /Users/shawndrost/.rvm/gems/ruby-1.9.3-p125@hb_server/gems/carrierwave-0.6.2/lib/carrierwave/uploader/callbacks.rb:17:in `with_callbacks'
 # /Users/shawndrost/.rvm/gems/ruby-1.9.3-p125@hb_server/gems/carrierwave-0.6.2/lib/carrierwave/uploader/store.rb:58:in `store!'
 # /Users/shawndrost/.rvm/gems/ruby-1.9.3-p125@hb_server/gems/carrierwave-0.6.2/lib/carrierwave/mount.rb:345:in `store!'
 # /Users/shawndrost/.rvm/gems/ruby-1.9.3-p125@hb_server/gems/carrierwave-0.6.2/lib/carrierwave/mount.rb:217:in `store_img!'
@nadavs
Copy link
Contributor

nadavs commented Jun 27, 2012

Thank you for reporting this issue.
There was a temporary problem with one of our servers at that time. Sorry about that. We detected the problem, made sure this specific problem should not happen again and improved our monitoring.

In addition, we will make sure that a correct HTTP response (code & json with error message) will return in this case.

Regarding a status page, we plan to add a public status page of our service. Currently we've updated Pingdom monitoring to perform applicative actions (e.g., image processing checks) in each ping.
You can see the public status page here: http://stats.pingdom.com/mkbtgoimtk3r/582639

@nadavs nadavs closed this as completed Jun 27, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants