Skip to content

rlugge/api_slideshow

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

This is a ‘living slideshow’ of code for the purposes of demonstrating various concepts regarding programming an API in Ruby on Rails. This slideshow is aimed primarily and specifically at an API-only construct but can be used in conjuction with other techniques to build a more fully featured side. Please check out the commits at various stages to view the various states of the app and the information that should be gleaned from each of them.

Lets assume you’re completely and utterly paranoid, and really want to know if your server goes down for any reason.

This is actually a good time to catch exception, just remember that you need to re-raise it. You’re going to need to be clever about how you do this, or you’re going to get hit with text messages every five seconds, but if you catch exceptions explicitly and consistently you could do this. I strongly recomend, however, that you set up an midway server to manage this process so that the texts are rate-limited rather than spamming you constantly.

To do this, simply catch exception, then raise it again.

rescue_from Exception do |exception|

  text_admin(exception.message)
  raise exception
end

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published