mirror of
https://github.com/tomru/pfadi-bussle.git
synced 2026-03-03 06:27:11 +01:00
improve logging?
This commit is contained in:
committed by
Thomas Ruoff
parent
942066bc7a
commit
00002a62d2
@@ -1,6 +1,7 @@
|
||||
import React, { useEffect, useReducer } from 'react'
|
||||
import { useRouter } from 'next/router'
|
||||
import { clearBookingData, loadBookingData } from '../helpers/storage'
|
||||
import { log } from '../helpers/log'
|
||||
|
||||
import { createBooking } from '../helpers/booking'
|
||||
import { Booking } from '../db/booking'
|
||||
@@ -156,7 +157,7 @@ export default function BookProvider({ children }) {
|
||||
const booking = await createBooking(state.formData)
|
||||
router.push(`/bookings/${booking.uuid}/stored`)
|
||||
} catch (error) {
|
||||
console.error(error)
|
||||
log.error('Failed to store booking', error)
|
||||
dispatch({ type: ACTIONS.POST_DATA_ERROR, payload: error.message })
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user