File tree Expand file tree Collapse file tree 3 files changed +8
-4
lines changed
Functions/FirebaseFunctions Expand file tree Collapse file tree 3 files changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -29,6 +29,8 @@ NS_ASSUME_NONNULL_BEGIN
29
29
* @param serializer A serializer to use to decode the details in the error response.
30
30
* @return The corresponding error.
31
31
*/
32
- NSError *FUNErrorForResponse (NSInteger status, NSData *_Nullable body, FUNSerializer *serializer);
32
+ NSError *_Nullable FUNErrorForResponse (NSInteger status,
33
+ NSData *_Nullable body,
34
+ FUNSerializer *serializer);
33
35
34
36
NS_ASSUME_NONNULL_END
Original file line number Diff line number Diff line change @@ -90,7 +90,7 @@ FIRFunctionsErrorCode FIRFunctionsErrorCodeForName(NSString *name) {
90
90
};
91
91
});
92
92
NSNumber *code = errors[name];
93
- if (code) {
93
+ if (code != nil ) {
94
94
return code.intValue ;
95
95
}
96
96
return FIRFunctionsErrorCodeInternal;
@@ -141,7 +141,9 @@ FIRFunctionsErrorCode FIRFunctionsErrorCodeForName(NSString *name) {
141
141
return @" UNKNOWN" ;
142
142
}
143
143
144
- NSError *FUNErrorForResponse (NSInteger status, NSData *_Nullable body, FUNSerializer *serializer) {
144
+ NSError *_Nullable FUNErrorForResponse (NSInteger status,
145
+ NSData *_Nullable body,
146
+ FUNSerializer *serializer) {
145
147
// Start with reasonable defaults from the status code.
146
148
FIRFunctionsErrorCode code = FIRFunctionsErrorCodeForHTTPStatus (status);
147
149
NSString *description = FUNDescriptionForErrorCode (code);
Original file line number Diff line number Diff line change @@ -152,7 +152,7 @@ - (id)decodeWrappedType:(NSDictionary *)wrapped error:(NSError **)error {
152
152
if ([type isEqualToString: kLongType ]) {
153
153
NSNumberFormatter *formatter = [[NSNumberFormatter alloc ] init ];
154
154
NSNumber *n = [formatter numberFromString: value];
155
- if (!n ) {
155
+ if (n == nil ) {
156
156
*error = FUNInvalidNumberError (value, wrapped);
157
157
return nil ;
158
158
}
You can’t perform that action at this time.
0 commit comments