You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Using the generic NSError as the error object to callbacks leads to bugs trying to read elements from userInfo which can contain anything.
* Calls to client to execute request will use this new OneSignalClientError object in the callback.
return [NSErrorerrorWithDomain:@"OneSignal Error"code:0userInfo:@{@"error" : [NSStringstringWithFormat:@"Attempted to perform an HTTP request (%@) before the user provided privacy consent.", type]}];
return [[OneSignalClientError alloc] initWithCode:0message:[NSStringstringWithFormat:@"Attempted to perform an HTTP request (%@) before the user provided privacy consent.", type]responseHeaders:nilresponse:nilunderlyingError:nil];
failureBlock([NSErrorerrorWithDomain:@"onesignal"code:0userInfo:@{@"error" : [NSStringstringWithFormat:@"Attempted to execute a data-only API request (%@) using OneSignalClient's executeRequest: method, which only accepts JSON-based API requests", NSStringFromClass(request.class)]}]);
89
+
failureBlock([[OneSignalClientError alloc] initWithCode:0message:[NSStringstringWithFormat:@"Attempted to execute a data-only API request (%@) using OneSignalClient's executeRequest: method, which only accepts JSON-based API requests", NSStringFromClass(request.class)]responseHeaders:nilresponse:nilunderlyingError:nil]);
0 commit comments