DoSomethingArchive / LetsDoThis-iOS

:iphone: iOS source code for DoSomething: Take Action on the News
http://app.dosomething.org
MIT License
2 stars 0 forks source link

AFNetworking 3.0 #1037

Closed aaronschachter closed 8 years ago

aaronschachter commented 8 years ago

Updates Podfile to AFNetworking 3.1 to close #1032.. but not amped up about needing to fork a 3.0 branch of the AFNetworkActivityLogger. The errors in this branch don't return the debug object in Northstar errors like develop currently does.

This branch:

2016-05-27 12:33:22.955 DoSomething[7484:1161539] [Error] POST 'https://northstar-qa.dosomething.org/v1/auth/register?create_drupal_user=1' (500) [1.0283 s]: Error Domain=com.alamofire.error.serialization.response Code=-1011 "Request failed: internal server error (500)" UserInfo={com.alamofire.serialization.response.error.response=<NSHTTPURLResponse: 0x7fe45d978d50> { URL: https://northstar-qa.dosomething.org/v1/auth/register?create_drupal_user=1 } { status code: 500, headers {
    "Cache-Control" = "no-cache";
    "Content-Type" = "application/json";
    Date = "Fri, 27 May 2016 19:33:22 GMT";
    Server = "nginx/1.4.6 (Ubuntu)";
    "Transfer-Encoding" = Identity;
} }, NSErrorFailingURLKey=https://northstar-qa.dosomething.org/v1/auth/register?create_drupal_user=1, com.alamofire.serialization.response.error.data=<7b226572 ..  [removed] ...  222c226c 696e6522 3a31367d 7d>, NSLocalizedDescription=Request failed: internal server error (500)}

develop:

2016-05-27 12:49:18.012 DoSomething[8346:1266812] 500 'https://northstar-qa.dosomething.org/v1/auth/register?create_drupal_user=1' [0.6757 s]: {
    "Cache-Control" = "no-cache";
    "Content-Type" = "application/json";
    Date = "Fri, 27 May 2016 19:49:17 GMT";
    Server = "nginx/1.4.6 (Ubuntu)";
    "Transfer-Encoding" = Identity;
} {
    debug =     {
        file = "/var/www/northstar/releases/20160513190527/app/Http/Transformers/UserTransformer.php";
        line = 16;
    };
    error =     {
        code = 500;
        message = "Type error: Argument 1 passed to Northstar\\Http\\Transformers\\UserTransformer::transform() must be an instance of Northstar\\Models\\User, null given, called in /var/www/northstar/releases/20160513190527/vendor/league/fractal/src/Scope.php on line 338";
    };
}
aaronschachter commented 8 years ago

Holding off going this route -- the progress handlers are a nice-to-have but until we figure out why the errors aren't logged as well / AFNetworkingActivityLogger support, for I'd prefer to have the better error responses vs keeping up to date on latest.

Per the migration guide:

AFNetworking 2.x will continue to receive critical bug and security fixes, but no new functionality will be added going forward.