You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I use the getJsonPayload method in a passthrough service (Client.forward()) and the backend service is exposed over HTTPS, I get the following error.
time=2024-10-21T08:21:40.885-04:00 level=ERROR module=ballerina/http message="unhandled error returned from the service" error={"causes":[],"message":"Bad Gateway","detail":{"statusCode":502,"headers":{"alt-svc":["h3=":443"; ma=2592000"],"content-length":["0"],"date":["Mon, 21 Oct 2024 12:21:40 GMT"],"server":["Caddy"],"x-http2-stream-id":["3"]},"body":()},"stackTrace":[{"callableName":"createResponseError","moduleName":"ballerina.http.2","fileName":"http_client_endpoint.bal","lineNumber":676},{"callableName":"processResponse","moduleName":"ballerina.http.2","fileName":"http_client_endpoint.bal","lineNumber":706},{"callableName":"processForward","moduleName":"ballerina.http.2.Client","fileName":"http_client_endpoint.bal","lineNumber":371}]} path="/api/proxy" method="POST"
The error does not occur when I use the getTextPayload method instead of getJsonPayload. And the error also does not occur when I use the getJsonPayload method and the endpoint backend is exposed via http.
Steps to Reproduce
Create the api
import ballerina/http;
import ballerina/io;
http:Client clientEP = check new ("https://micarro2.free.beeceptor.com");
service /api on new http:Listener(8080) {
resource function post proxy(http:Request req) returns anydata|error {
json payloadOrig = check req.getJsonPayload();
io:println(payloadOrig);
anydata response = check clientEP->forward("/proxy", req);
return response;
}
}
Run with bal run
Version
ballerina:2201.9.0
Environment Details (with versions)
Image ballerina/ballerina:2201.9.0
Docker version 20.10.12
WSL 2
Windows 11 Pro
The text was updated successfully, but these errors were encountered:
Description
When I use the getJsonPayload method in a passthrough service (Client.forward()) and the backend service is exposed over HTTPS, I get the following error.
The error does not occur when I use the getTextPayload method instead of getJsonPayload. And the error also does not occur when I use the getJsonPayload method and the endpoint backend is exposed via http.
Steps to Reproduce
Version
ballerina:2201.9.0
Environment Details (with versions)
Image ballerina/ballerina:2201.9.0
Docker version 20.10.12
WSL 2
Windows 11 Pro
The text was updated successfully, but these errors were encountered: