From 1d80d472e148d97d32900d106cf6810b605dffac Mon Sep 17 00:00:00 2001 From: Alex Zolotarev Date: Sat, 9 Jan 2016 11:41:51 +0300 Subject: [PATCH] Correctly renamed ServerError to NetworkError. --- editor/osm_auth.cpp | 8 ++++---- editor/osm_auth.hpp | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/editor/osm_auth.cpp b/editor/osm_auth.cpp index c03cebd3d8..4a9d41e057 100644 --- a/editor/osm_auth.cpp +++ b/editor/osm_auth.cpp @@ -234,7 +234,7 @@ OsmOAuth::Response OsmOAuth::Request(ClientToken const & token, string const & m else { ASSERT(false, ("Unsupported OSM API request method", httpMethod)); - return Response(ResponseCode::ServerError, string()); + return Response(ResponseCode::NetworkError, string()); } string const url = m_apiUrl + kApiVersion + method; @@ -244,7 +244,7 @@ OsmOAuth::Response OsmOAuth::Request(ClientToken const & token, string const & m if (httpMethod != "GET") request.set_body_data(body, "application/xml", httpMethod); if (!request.RunHTTPRequest() || request.was_redirected()) - return Response(ResponseCode::ServerError, string()); + return Response(ResponseCode::NetworkError, string()); return Response(static_cast(request.error_code()), request.server_response()); } @@ -253,7 +253,7 @@ OsmOAuth::Response OsmOAuth::DirectRequest(string const & method, bool api) cons string const url = api ? m_apiUrl + kApiVersion + method : m_baseUrl + method; HTTPClientPlatformWrapper request(url); if (!request.RunHTTPRequest()) - return Response(ResponseCode::ServerError, string()); + return Response(ResponseCode::NetworkError, string()); return Response(static_cast(request.error_code()), request.server_response()); } @@ -303,7 +303,7 @@ string DebugPrint(OsmOAuth::ResponseCode const code) { switch (code) { - case OsmOAuth::ResponseCode::ServerError: return "ServerError"; + case OsmOAuth::ResponseCode::NetworkError: return "NetworkError"; case OsmOAuth::ResponseCode::OK: return "OK"; case OsmOAuth::ResponseCode::BadXML: return "BadXML"; case OsmOAuth::ResponseCode::Redacted: return "Redacted"; diff --git a/editor/osm_auth.hpp b/editor/osm_auth.hpp index 30e3d753dc..67e13365d9 100644 --- a/editor/osm_auth.hpp +++ b/editor/osm_auth.hpp @@ -35,7 +35,7 @@ public: /// A result of a request. Has readable values for all OSM API return codes. enum class ResponseCode { - ServerError = -1, + NetworkError = -1, OK = 200, BadXML = 400, Redacted = 403,