|
|
|
@ -319,9 +319,12 @@ NSString * const kGRPCStatusMetadataKey = @"io.grpc.StatusMetadataKey"; |
|
|
|
|
if (strongSelf) { |
|
|
|
|
[strongSelf->_responseMetadata addEntriesFromDictionary:trailers]; |
|
|
|
|
|
|
|
|
|
NSMutableDictionary *userInfo = [NSMutableDictionary dictionaryWithDictionary:error.userInfo]; |
|
|
|
|
userInfo[kGRPCStatusMetadataKey] = strongSelf->_responseMetadata; |
|
|
|
|
error = [NSError errorWithDomain:error.domain code:error.code userInfo:userInfo]; |
|
|
|
|
if (error) { |
|
|
|
|
NSMutableDictionary *userInfo = |
|
|
|
|
[NSMutableDictionary dictionaryWithDictionary:error.userInfo]; |
|
|
|
|
userInfo[kGRPCStatusMetadataKey] = strongSelf->_responseMetadata; |
|
|
|
|
error = [NSError errorWithDomain:error.domain code:error.code userInfo:userInfo]; |
|
|
|
|
} |
|
|
|
|
[strongSelf finishWithError:error]; |
|
|
|
|
} |
|
|
|
|
}]; |
|
|
|
|