2mac / hotlogger

The fast, real-time, multi-user ham radio logbook
Other
0 stars 0 forks source link

Navigating from a Logbook to Logbook Settings then saving causes error on redirect (breaking logo) #36

Closed joejak closed 9 months ago

joejak commented 9 months ago

Steps to Reproduce:

  1. Create or open a logbook which isn't Shared.
  2. Click "Logbook Settings"
  3. Check "Shared?"
  4. Click "Save"
  5. Should recieve 500 error
2mac commented 9 months ago

Unable to reproduce 500 error, but I do see 404 errors coming from pocketbase when doing this suggesting that it's trying to look up the wrong logbook ID.

joejak commented 9 months ago

Stand by for video of error

joejak commented 9 months ago

https://github.com/2mac/hotlogger/assets/47066840/44c68a75-44f0-4fc6-9c42-f8068f1cd280

joejak commented 9 months ago

Only error I'm seeing in Server Logs:


ClientResponseError 400: Something went wrong while processing your request.
    at file:///home/sirgausshawk/projects/personal/hotlogger/node_modules/pocketbase/dist/pocketbase.es.mjs:1:31966
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async Module.updateLog (/home/sirgausshawk/projects/personal/hotlogger/src/lib/server/database.js:40:12)
    at async save (/home/sirgausshawk/projects/personal/hotlogger/src/routes/log/[id]/settings/+page.server.js:25:9)
    at async Module.handle_action_request (/home/sirgausshawk/projects/personal/hotlogger/node_modules/@sveltejs/kit/src/runtime/server/page/actions.js:156:16)
    at async Module.render_page (/home/sirgausshawk/projects/personal/hotlogger/node_modules/@sveltejs/kit/src/runtime/server/page/index.js:63:20)
    at async resolve (/home/sirgausshawk/projects/personal/hotlogger/node_modules/@sveltejs/kit/src/runtime/server/respond.js:409:18)
    at async Module.respond (/home/sirgausshawk/projects/personal/hotlogger/node_modules/@sveltejs/kit/src/runtime/server/respond.js:282:20)
    at async file:///home/sirgausshawk/projects/personal/hotlogger/node_modules/@sveltejs/kit/src/exports/vite/dev/index.js:502:22 {
  url: 'http://127.0.0.1:8090/api/collections/logbooks/records/g3t90rhuunohemn',
  status: 400,
  response: {
    code: 400,
    message: 'Something went wrong while processing your request.',
    data: { custom: [Object] }
  },
  isAbort: false,
  originalError: {
    url: 'http://127.0.0.1:8090/api/collections/logbooks/records/g3t90rhuunohemn',
    status: 400,
    data: {
      code: 400,
      message: 'Something went wrong while processing your request.',
      data: [Object]
    }
  }
}```
joejak commented 9 months ago

I'm an idiot