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,
|
UseInterceptors,
|
||||||
ClassSerializerInterceptor,
|
ClassSerializerInterceptor,
|
||||||
Query,
|
Query,
|
||||||
Response,
|
|
||||||
} from '@nestjs/common'
|
} from '@nestjs/common'
|
||||||
import { InjectQueue } from '@nestjs/bull'
|
import { InjectQueue } from '@nestjs/bull'
|
||||||
import { Dayjs } from 'dayjs'
|
import { Dayjs } from 'dayjs'
|
||||||
|
|
|
||||||
|
|
@ -138,6 +138,7 @@ export class BaanReserverenService {
|
||||||
?.waitForSelector('td.month.next')
|
?.waitForSelector('td.month.next')
|
||||||
.then((d) => d?.click())
|
.then((d) => d?.click())
|
||||||
.catch((e: Error) => {
|
.catch((e: Error) => {
|
||||||
|
this.loggerService.error('Failed to switch months', { error: e })
|
||||||
throw new RunnerNavigationMonthError(e)
|
throw new RunnerNavigationMonthError(e)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
@ -150,6 +151,7 @@ export class BaanReserverenService {
|
||||||
)
|
)
|
||||||
.then((d) => d?.click())
|
.then((d) => d?.click())
|
||||||
.catch((e: Error) => {
|
.catch((e: Error) => {
|
||||||
|
this.loggerService.error('Failed to select day', { error: e })
|
||||||
throw new RunnerNavigationDayError(e)
|
throw new RunnerNavigationDayError(e)
|
||||||
})
|
})
|
||||||
await this.page
|
await this.page
|
||||||
|
|
@ -159,6 +161,9 @@ export class BaanReserverenService {
|
||||||
)}.selected`,
|
)}.selected`,
|
||||||
)
|
)
|
||||||
.catch((e: Error) => {
|
.catch((e: Error) => {
|
||||||
|
this.loggerService.error('Failed to wait for selected day', {
|
||||||
|
error: e,
|
||||||
|
})
|
||||||
throw new RunnerNavigationSelectionError(e)
|
throw new RunnerNavigationSelectionError(e)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue