Skip to content

Bug: Overdue handler cannot find entry #1533

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
sentry-io bot opened this issue Dec 18, 2024 · 1 comment
Closed

Bug: Overdue handler cannot find entry #1533

sentry-io bot opened this issue Dec 18, 2024 · 1 comment
Assignees
Labels
bug Something isn't working Priority: High Issues that are with very high priority

Comments

@sentry-io
Copy link

sentry-io bot commented Dec 18, 2024

This error still happens. I have also assigned it to @DonKoko in Sentry to take a look at it.

PrismaClientKnownRequestError: 
Invalid `prisma.booking.update()` invocation:


An operation failed because it depends on one or more records that were required but not found. Record to update not found.
  File "/src/build/server/index.js", line 8229, in overdueHandler
    const booking = await db.booking.update({
  File "/src/build/server/index.js", line 8317
    await handler(job);
...
(4 additional frame(s) were not displayed)

ShelfError: Booking update failed
  File "/src/build/server/index.js", line 8233
    throw new ShelfError({
  File "/src/build/server/index.js", line 8229, in overdueHandler
    const booking = await db.booking.update({
  File "/src/build/server/index.js", line 8317
    await handler(job);

ShelfError: Something went wrong while executing scheduled work.
  File "/src/build/server/index.js", line 8320
    new ShelfError({
@sentry-io sentry-io bot added bug Something isn't working Priority: High Issues that are with very high priority labels Dec 18, 2024
@DonKoko DonKoko moved this to 🗓️ Planned in 🗺️ Shelf Roadmap Dec 18, 2024
@DonKoko
Copy link
Contributor

DonKoko commented Jan 24, 2025

Okey this happened to me in my local. Here was the error:

{
  "level": 50,
  "time": 1737721303124,
  "pid": 316416,
  "hostname": "DESKTOP-4O50AD2",
  "err": {
    "cause": {
      "cause": {
        "name": "PrismaClientKnownRequestError",
        "code": "P2025",
        "clientVersion": "5.21.1",
        "meta": {
          "modelName": "Booking",
          "cause": "Record to update not found."
        },
        "stack": "PrismaClientKnownRequestError: \nInvalid `prisma.booking.update()` invocation:\n\n\nAn operation failed because it depends on one or more records that were required but not found. Record to update not found.\n    at Mn.handleRequestError (/home/donkoko/devs/shelf/webapp/node_modules/@prisma/client/runtime/library.js:121:7753)\n    at Mn.handleAndLogRequestError (/home/donkoko/devs/shelf/webapp/node_modules/@prisma/client/runtime/library.js:121:7061)\n    at Mn.request (/home/donkoko/devs/shelf/webapp/node_modules/@prisma/client/runtime/library.js:121:6745)\n    at async l (/home/donkoko/devs/shelf/webapp/node_modules/@prisma/client/runtime/library.js:130:9633)\n    at async overdueHandler (/home/donkoko/devs/shelf/webapp/app/modules/booking/worker.server.ts:99:19)\n    at async eval (/home/donkoko/devs/shelf/webapp/app/modules/booking/worker.server.ts:185:7)\n    at async resolveWithinSeconds (/home/donkoko/devs/shelf/webapp/node_modules/pg-boss/src/manager.js:35:14)\n    at async /home/donkoko/devs/shelf/webapp/node_modules/p-map/index.js:57:22"
      },
      "label": "Booking",
      "additionalData": {
        "data": {
          "id": "cm6aqcncr000h6q2b0s72esxf",
          "hints": { "locale": "en", "timeZone": "Europe/Sofia" },
          "eventType": "booking-overdue-handler"
        },
        "work": "booking-overdue-handler"
      },
      "shouldBeCaptured": true,
      "status": 404,
      "traceId": "k6e8w0ysytb01rg7lrmbdhq4",
      "name": "ShelfError",
      "message": "Booking update failed",
      "stack": "ShelfError: Booking update failed\n    at eval (/home/donkoko/devs/shelf/webapp/app/modules/booking/worker.server.ts:103:11)\n    at async overdueHandler (/home/donkoko/devs/shelf/webapp/app/modules/booking/worker.server.ts:99:19)\n    at async eval (/home/donkoko/devs/shelf/webapp/app/modules/booking/worker.server.ts:185:7)\n    at async resolveWithinSeconds (/home/donkoko/devs/shelf/webapp/node_modules/pg-boss/src/manager.js:35:14)\n    at async /home/donkoko/devs/shelf/webapp/node_modules/p-map/index.js:57:22"
    },
    "label": "Booking",
    "additionalData": {
      "data": {
        "id": "cm6aqcncr000h6q2b0s72esxf",
        "hints": { "locale": "en", "timeZone": "Europe/Sofia" },
        "eventType": "booking-overdue-handler"
      },
      "work": "booking-overdue-handler"
    },
    "shouldBeCaptured": true,
    "status": 404,
    "traceId": "xqcxxfoo6hbt2cwbwtjzu1ht",
    "name": "ShelfError",
    "message": "Something went wrong while executing scheduled work.",
    "stack": "ShelfError: Something went wrong while executing scheduled work.\n    at eval (/home/donkoko/devs/shelf/webapp/app/modules/booking/worker.server.ts:188:9)\n    at async resolveWithinSeconds (/home/donkoko/devs/shelf/webapp/node_modules/pg-boss/src/manager.js:35:14)\n    at async /home/donkoko/devs/shelf/webapp/node_modules/p-map/index.js:57:22"
  },
  "msg": "Something went wrong while executing scheduled work."
}

My booking stayed checked-out and didnt turn into overdue

Image

@DonKoko DonKoko moved this from 🗓️ Planned to ✅ Done in 🗺️ Shelf Roadmap Mar 26, 2025
@DonKoko DonKoko closed this as completed Mar 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Priority: High Issues that are with very high priority
Projects
Status: Done
Development

No branches or pull requests

1 participant