Skip to content

Commit 3fd694d

Browse files
committed
Return early in case of error to avoid NRE
1 parent d28f226 commit 3fd694d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

FinancialModelingPrepApi/Core/Http/FinancialModelingPrepHttpClient.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ public async Task<ApiResponse<T>> GetAsync<T>(string urlPattern, NameValueCollec
3535

3636
if (response.HasError)
3737
{
38-
ApiResponse.FromError<T>(response.Data);
38+
return ApiResponse.FromError<T>(response.Error);
3939
}
4040

4141
if (response.Data.Contains("Error Message"))

0 commit comments

Comments
 (0)