Adding some error logging when selecting day
This commit is contained in:
parent
714f74cf63
commit
bdcf1b753f
2 changed files with 5 additions and 1 deletions
|
|
@ -11,7 +11,6 @@ import {
|
|||
UseInterceptors,
|
||||
ClassSerializerInterceptor,
|
||||
Query,
|
||||
Response,
|
||||
} from '@nestjs/common'
|
||||
import { InjectQueue } from '@nestjs/bull'
|
||||
import { Dayjs } from 'dayjs'
|
||||
|
|
|
|||
|
|
@ -138,6 +138,7 @@ export class BaanReserverenService {
|
|||
?.waitForSelector('td.month.next')
|
||||
.then((d) => d?.click())
|
||||
.catch((e: Error) => {
|
||||
this.loggerService.error('Failed to switch months', { error: e })
|
||||
throw new RunnerNavigationMonthError(e)
|
||||
})
|
||||
}
|
||||
|
|
@ -150,6 +151,7 @@ export class BaanReserverenService {
|
|||
)
|
||||
.then((d) => d?.click())
|
||||
.catch((e: Error) => {
|
||||
this.loggerService.error('Failed to select day', { error: e })
|
||||
throw new RunnerNavigationDayError(e)
|
||||
})
|
||||
await this.page
|
||||
|
|
@ -159,6 +161,9 @@ export class BaanReserverenService {
|
|||
)}.selected`,
|
||||
)
|
||||
.catch((e: Error) => {
|
||||
this.loggerService.error('Failed to wait for selected day', {
|
||||
error: e,
|
||||
})
|
||||
throw new RunnerNavigationSelectionError(e)
|
||||
})
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue