Official comment

Hi Daniel,
Thank you for reaching out to AeroCRS.
We will continue to support your inquiry in the ticket you opened.
Have a great day.
I'm facing the following issue with the
API Endpoint: https://api.aerocrs.com/v5/getAvailability
Request Body:
{ "aerocrs": { "parms": { "dates": { "start": "2023/05/19", "end": "2023/06/19" }, "destinations": { "from": "WIL", "to": "MBA" } } } }When I make the API request using Ruby, I receive an error response instead of the expected data. However, when I tested the same request using Postman, it worked without any issues.
The error message I received when making the request using Ruby is as follows:
{"errorType"=>"string",#39;toUpperCase')<br> at /var/task/aerocrs-getavailability-31f3835b4e40/index.js:32:53<br> at Layer.handle [as handle_request] (/var/task/aerocrs-getavailability-31f3835b4e40/node_modules/express/lib/router/layer.js:95:5)<br> at next (/var/task/aerocrs-getavailability-31f3835b4e40/node_modules/express/lib/router/route.js:137:13)<br> at Route.dispatch (/var/task/aerocrs-getavailability-31f3835b4e40/node_modules/express/lib/router/route.js:112:3)<br> at Layer.handle [as handle_request] (/var/task/aerocrs-getavailability-31f3835b4e40/node_modules/express/lib/router/layer.js:95:5)<br> at /var/task/aerocrs-getavailability-31f3835b4e40/node_modules/express/lib/router/index.js:281:22<br> at Function.process_params (/var/task/aerocrs-getavailability-31f3835b4e40/node_modules/express/lib/router/index.js:335:12)<br> at next (/var/task/aerocrs-getavailability-31f3835b4e40/node_modules/express/lib/router/index.js:275:10)<br> at jsonParser (/var/task/aerocrs-getavailability-31f3835b4e40/node_modules/body-parser/lib/types/json.js:110:7)<br> at Layer.handle [as handle_request] (/var/task/aerocrs-getavailability-31f3835b4e40/node_modules/express/lib/router/layer.js:95:5)<br> at trim_prefix (/var/task/aerocrs-getavailability-31f3835b4e40/node_modules/express/lib/router/index.js: "317:13)<br> at /var/task/aerocrs-getavailability-31f3835b4e40/node_modules/express/lib/router/index.js:284:7<br> at Function.process_params (/var/task/aerocrs-getavailability-31f3835b4e40/node_modules/express/lib/router/index.js:335:12)<br> at next (/var/task/aerocrs-getavailability-31f3835b4e40/node_modules/express/lib/router/index.js:275:10)<br> at urlencodedParser (/var/task/aerocrs-getavailability-31f3835b4e40/node_modules/body-parser/lib/types/urlencoded.js:91:7)<br> at Layer.handle [as handle_request] (/var/task/aerocrs-getavailability-31f3835b4e40/node_modules/express/lib/router/layer.js:95:5)<br> at trim_prefix (/var/task/aerocrs-getavailability-31f3835b4e40/node_modules/express/lib/router/index.js:317:13)<br> at /var/task/aerocrs-getavailability-31f3835b4e40/node_modules/express/lib/router/index.js:284:7<br> at Function.process_params (/var/task/aerocrs-getavailability-31f3835b4e40/node_modules/express/lib/router/index.js:335:12)<br> at next (/var/task/aerocrs-getavailability-31f3835b4e40/node_modules/express/lib/router/index.js:275:10)<br> at apiGatewayEventParser (/var/task/aerocrs-getavailability-31f3835b4e40/node_modules/aws-serverless-express/src/middleware.js:22:3)<br> at Layer.handle [as handle_request] (/var/task/aerocrs-getavailability-31f3835b4e40/node_modules/express/lib/router/layer.js:95:5)</pre>\n" + "</body>\n" + "</html>\n", "trace"=>[]}
"errorMessage"=> "<!DOCTYPE html>\n" + "<html lang=\"en\">\n" + "<head>\n" + "<meta charset=\"utf-8\">\n" + "<title>Error</title>\n" + "</head>\n" + "<body>\n" + "<pre>TypeError: Cannot read properties of undefined (reading &I have tested the API request using Postman, and it works without any issues, so I suspect there might be an issue related to the Ruby code or the request configuration. I have reviewed my code and ensured that the request is set up correctly.
Could anyone provide any guidance or support to help me resolve it? It would be greatly appreciated.
Hi Daniel,
Thank you for reaching out to AeroCRS.
We will continue to support your inquiry in the ticket you opened.
Have a great day.
Please sign in to leave a comment.