Skip to content

Commit

Permalink
Whoops.
Browse files Browse the repository at this point in the history
- It seems the DELETE method does not exist in the Gemini API's endpoints.
- I've also fixed the bug with empty response confirmations.
  • Loading branch information
Uralstech committed Sep 8, 2024
1 parent 0f89fa9 commit f5d464c
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 3 deletions.
1 change: 0 additions & 1 deletion Documentation/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,6 @@ Do not use preview versions (i.e. versions that end with "-preview") for product
- ✔️ `list` method

- ✔️ `operations` endpoint\*
- ✔️ `delete` method
- ✔️ `list` method

🧪 - Using the v1beta API
Expand Down
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,6 @@ Do not use preview versions (i.e. versions that end with "-preview") for product
- [x] `list` method

- [x] `operations` endpoint\*
- [x] `delete` method
- [x] `list` method

🧪 - Using the v1beta API
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,7 @@ private TResponse ConfirmResponse<TResponse>(UnityWebRequest request)
/// <exception cref="GeminiResponseParsingException">Thrown if the response was not empty.</exception>
private void ConfirmResponse(UnityWebRequest request)
{
if (!string.IsNullOrEmpty(request.downloadHandler?.text) || request.downloadHandler.text.Trim() == EmptyJsonObject)
if (!string.IsNullOrEmpty(request.downloadHandler?.text) && request.downloadHandler.text.Trim() != EmptyJsonObject)
{
Debug.LogError($"Failed to confirm successful API response:\n{request.downloadHandler?.text}");
throw new GeminiResponseParsingException(request);
Expand Down

0 comments on commit f5d464c

Please sign in to comment.