Add an error class to be used when the server responds with a 504 Gateway Timeout error

I noticed requests when searching for events often returning a 504 status, which would cause the JSON parsing to choke on the returned HTML error page since there was no error class for a 504 status.