Closed tsolakoua closed 3 years ago
When we do a flight search, the app breaks. It looks like the input from the frontend doesn't pass correctly in the backend.
For example this is the input in the frontend we can see in the console:
However, when we call the Flight Offers Search API it looks like the dates taken are the default ones from the calendar (check https://github.com/amadeus4dev/amadeus-flight-booking-node/issues/31).
Apart from that, even though in the frontend we define a return date, returnDate is not existing at all in the API call.
returnDate
ClientError { response: Response { contentType: 'application/vnd.amadeus+json', statusCode: 400, request: Request { host: 'test.api.amadeus.com', port: 443, ssl: true, scheme: 'https', verb: 'GET', path: '/v2/shopping/flight-offers', params: [Object], queryPath: '/v2/shopping/flight-offers?originLocationCode=MAD&destinationLocationCode=ATH&departureDate=2020-05-01&adults=1', bearerToken: '', clientVersion: '4.0.0', languageVersion: '13.8.0', appId: null, appVersion: null, headers: [Object] }, body: '{"errors":[{"status":400,"code":425,"title":"INVALID DATE","detail":"Date/Time is in the past","source":{}}]}', result: { errors: [Array] }, data: undefined, parsed: true }, description: [ { status: 400, code: 425, title: 'INVALID DATE', detail: 'Date/Time is in the past', source: {} } ], code: 'ClientError' }
Hi! I'm ready to help with it
You can take it the issue @ipgpt :)
When we do a flight search, the app breaks. It looks like the input from the frontend doesn't pass correctly in the backend.
For example this is the input in the frontend we can see in the console:
However, when we call the Flight Offers Search API it looks like the dates taken are the default ones from the calendar (check https://github.com/amadeus4dev/amadeus-flight-booking-node/issues/31).
Apart from that, even though in the frontend we define a return date,
returnDate
is not existing at all in the API call.