BREAKING CHANGE(booking API schema changes): Merged in feat/SW-1342-booking-api-updates (pull request #1160)
fix: update booking status schema and affected code * fix: update booking api schema and affected code * fix: update meta prop in booking response schema Approved-by: Arvid Norlin
This commit is contained in:
@@ -41,10 +41,14 @@ export default async function PaymentCallbackPage({
|
||||
const bookingStatus = await serverClient().booking.status({
|
||||
confirmationNumber,
|
||||
})
|
||||
|
||||
// TODO: how to handle errors for multiple rooms?
|
||||
const error = bookingStatus.errors.find((e) => e.errorCode)
|
||||
|
||||
searchObject.set(
|
||||
"errorCode",
|
||||
bookingStatus?.metadata?.errorCode
|
||||
? bookingStatus.metadata.errorCode.toString()
|
||||
error
|
||||
? error.errorCode.toString()
|
||||
: PaymentErrorCodeEnum.Failed.toString()
|
||||
)
|
||||
} catch (error) {
|
||||
|
||||
Reference in New Issue
Block a user