mirror of
https://github.com/zoriya/octokit.net.git
synced 2026-06-07 20:30:41 +00:00
if no errors in array, use top-level message for error parsing
This commit is contained in:
@@ -7,7 +7,7 @@ namespace Octokit
|
||||
public static string FirstErrorMessageSafe(this ApiError apiError)
|
||||
{
|
||||
if (apiError == null) return null;
|
||||
if (apiError.Errors == null) return null;
|
||||
if (apiError.Errors == null) return apiError.Message;
|
||||
var firstError = apiError.Errors.FirstOrDefault();
|
||||
if (firstError == null) return null;
|
||||
return firstError.Message;
|
||||
|
||||
Reference in New Issue
Block a user