mirror of
https://github.com/zoriya/octokit.net.git
synced 2026-06-08 12:42:32 +00:00
Update ApiErrorMessageSafe to return null for empty and whitespace strings (#1540)
* return null if ApiError.Message is empty or whitespace * Uncomment test, which now passes
This commit is contained in:
committed by
Ryan Gribble
parent
620b1b9d89
commit
01a2d97212
@@ -178,7 +178,12 @@ namespace Octokit
|
||||
{
|
||||
get
|
||||
{
|
||||
return ApiError != null ? ApiError.Message : null;
|
||||
if (ApiError != null && !string.IsNullOrWhiteSpace(ApiError.Message))
|
||||
{
|
||||
return ApiError.Message;
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user