Crude error response handling. Add debugging gems to dev dependencies.