Skip to content

Commit

Permalink
Merge pull request #44 from nadheesh/main
Browse files Browse the repository at this point in the history
Add logic to handle status code 204 and 205 (no content cases)
  • Loading branch information
SasinduDilshara authored Feb 6, 2024
2 parents 41f1310 + 3f855d9 commit fe0fcb0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion ballerina/Ballerina.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
distribution = "2201.8.4"
org = "ballerinax"
name = "ai.agent"
version = "0.7.3"
version = "0.7.4"
license = ["Apache-2.0"]
authors = ["Ballerina"]
keywords = ["AI/Agent", "Cost/Freemium"]
Expand Down
2 changes: 1 addition & 1 deletion ballerina/http_utils.bal
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@ isolated function extractResponsePayload(string path, http:Response response) re
if contentLength is error {
return error HttpResponseParsingError("Error occurred while extracting content length from the response.", contentLength);
}
if contentLength is () || contentLength == 0 {
if contentLength == 0 || code == 204 || code == 205 {
return {
code,
path,
Expand Down

0 comments on commit fe0fcb0

Please sign in to comment.