Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Your Rails App is talking to you. Are you liste...

Your Rails App is talking to you. Are you listening? by Nadja Lederer

presentation during Rails Girls St. Pölten: Your Rails App is talking to you. Are you listening? by the Coach Nadja Lederer

Your Rails App is talking to you. Are you listening? (http standard response codes and sample error pages)

Transcript

  1. [1]

  2. Your Rails App is talking to you… Are you listening?

    Nadja Lederer Rails Girls St. Pölten, 29.3.2014
  3. HTTP = Hypertext Transfer Protocol ¤  protocol used by the

    World Wide Web ¤  defines what a message looks like, and how a web server or browser responds to it [2]
  4. HTTP = Hypertext Transfer Protocol ¤  protocol used by the

    World Wide Web HTTP world Real-life situations GET get more information about sth POST create something, take a pic, write a book, code your rails app ;) PUT / PATCH get yourself a new styling, pimp your car DELETE burger / veggie place, order sth and eat it all up
  5. HTTP Status Code Classes ¤  1xx . . . Informational

    ¤  2xx . . . Success ¤  3xx . . . Redirection ¤  4xx . . . Client Error ¤  5xx . . . Server Error [4]
  6. [5]

  7. [6]

  8. [7]

  9. [8]

  10. [9]

  11. Take away ¤  GET, POST, PUT / PATCH, DELETE ¤ 

    HTTP question & answer always come in pairs ¤  HTTP answer carries a status code ¤  Status codes tell about success / failure (and reason) ¤  Every Rails App has error pages in ./public directory ¤  Have fun customizing them ;)
  12. Picture References [1] http://fab404.com/wp-content/uploads/2009/03/frye-wiles404.jpg [2] http://www.officeassist.ca/images/j0309261.jpg [3] http://symfony.com/doc/current/_images/http-xkcd.png [4] http://media-cache-ak0.pinimg.com/236x/ff/e2/2b/ffe22b2e7c226d79a6876281ed25a340.jpg

    [5] http://www.flickr.com/photos/girliemac/6508022985/in/photostream/ [6] http://httpstatusdogs.com/301-moved-permanently [7] http://cdn6.blackhillswebworks.com/wp-content/uploads/2010/02/404page.jpg [8] http://www.evohosting.co.uk/wp-content/uploads/2011/07/freeassociation.png [9] http://blog.ifabbo.com/wp-content/uploads/404error.png [10] http://webdesignledger.com/wp-content/uploads/2009/10/404/25.jpg