Skip to content

Commit

Permalink
fix patch paypal http error #7
Browse files Browse the repository at this point in the history
  • Loading branch information
Osiris-Team committed Jan 10, 2023
1 parent d3ea259 commit 9f3b28c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/main/java/com/osiris/payhook/paypal/PayPalUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ public PayPalUtils updateProduct(Product product) throws IOException, HttpErrorE
patchDesc.addProperty("path", "/description");
patchDesc.addProperty("value", product.description);
arr.add(patchDesc);
utilsJson.patchJsonAndGetResponse(BASE_V1_URL + "/catalogs/products/" + product.paypalProductId, arr, this);
utilsJson.patchJsonAndGetResponse(BASE_V1_URL + "/catalogs/products/" + product.paypalProductId, arr, this, 204);
return this;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ public JsonElement jsonFromUrl(String requestMethod, String url, JsonElement ele
if (body == null) return null;
else return JsonParser.parseString(body.string());
} else {
throw new HttpErrorException(code, null, "\nurl: " + url + " \nmessage: " + response.message() + "\njson: \n"
throw new HttpErrorException(code, null, "\nurl: " + url + "\ncode: "+code+" \nmessage: " + response.message() + "\njson: \n"
+ (body != null ? body.string() : ""));
}
}
Expand Down

0 comments on commit 9f3b28c

Please sign in to comment.