Catching authentication errors with Ruby Exceptions