@ -27,7 +27,8 @@ namespace Grpc.Core.Internal
internal class NativeMetadataCredentialsPlugin
{
const string GetMetadataExceptionMsg = "Exception occured in metadata credentials plugin." ;
const string GetMetadataExceptionStatusMsg = "Exception occurred in metadata credentials plugin." ;
const string GetMetadataExceptionLogMsg = GetMetadataExceptionStatusMsg + " This is likely not a problem with gRPC itself. Please verify that the code supplying the metadata (usually an authentication token) works correctly." ;
static readonly ILogger Logger = GrpcEnvironment . Logger . ForType < NativeMetadataCredentialsPlugin > ( ) ;
static readonly NativeMethods Native = NativeMethods . Get ( ) ;
@ -67,8 +68,8 @@ namespace Grpc.Core.Internal
}
catch ( Exception e )
{
Native . grpcsharp_metadata_credentials_notify_from_plugin ( callbackPtr , userDataPtr , MetadataArraySafeHandle . Create ( Metadata . Empty ) , StatusCode . Unknown , GetMetadataExceptionMsg ) ;
Logger . Error ( e , GetMetadataExceptionMsg ) ;
Native . grpcsharp_metadata_credentials_notify_from_plugin ( callbackPtr , userDataPtr , MetadataArraySafeHandle . Create ( Metadata . Empty ) , StatusCode . Unknown , GetMetadataExceptionStatus Msg ) ;
Logger . Error ( e , GetMetadataExceptionLog Msg ) ;
}
}
@ -86,8 +87,8 @@ namespace Grpc.Core.Internal
}
catch ( Exception e )
{
Native . grpcsharp_metadata_credentials_notify_from_plugin ( callbackPtr , userDataPtr , MetadataArraySafeHandle . Create ( Metadata . Empty ) , StatusCode . Unknown , GetMetadataExceptionMsg ) ;
Logger . Error ( e , GetMetadataExceptionMsg ) ;
Native . grpcsharp_metadata_credentials_notify_from_plugin ( callbackPtr , userDataPtr , MetadataArraySafeHandle . Create ( Metadata . Empty ) , StatusCode . Unknown , GetMetadataExceptionStatus Msg ) ;
Logger . Error ( e , GetMetadataExceptionLog Msg ) ;
}
}
}