hoarder-app / hoarder

A self-hostable bookmark-everything app (links, notes and images) with AI-based automatic tagging and full text search
https://hoarder.app
GNU Affero General Public License v3.0
4.62k stars 154 forks source link

title limit - String must contain at most 100 character(s) #461

Open mrinc opened 2 weeks ago

mrinc commented 2 weeks ago
m [TRPCError]: [
  {
    "code": "too_big",
    "maximum": 100,
    "type": "string",
    "inclusive": true,
    "exact": false,
    "message": "String must contain at most 100 character(s)",
    "path": [
      "title"
    ]
  }
]
    at p (/app/apps/web/.next/server/chunks/2129.js:4:32074)
    at async d (/app/apps/web/.next/server/chunks/2129.js:4:32960)
    ... 5 lines matching cause stack trace ...
    at async g (/app/apps/web/.next/server/app/api/trpc/[trpc]/route.js:1:4333) {
  code: 'BAD_REQUEST',
  [cause]: o [ZodError]: [
    {
      "code": "too_big",
      "maximum": 100,
      "type": "string",
      "inclusive": true,
      "exact": false,
      "message": "String must contain at most 100 character(s)",
      "path": [
        "title"
      ]
    }
  ]
      at get error [as error] (/app/apps/web/.next/server/chunks/8109.js:58:14318)
      at Q.parseAsync (/app/apps/web/.next/server/chunks/8109.js:58:16801)
      at async p (/app/apps/web/.next/server/chunks/2129.js:4:32048)
      at async d (/app/apps/web/.next/server/chunks/2129.js:4:32960)
      at async d (/app/apps/web/.next/server/chunks/2129.js:4:32960)
      at async d (/app/apps/web/.next/server/chunks/2129.js:4:32960)
      at async p (/app/apps/web/.next/server/chunks/2129.js:4:33299)
      at async /app/apps/web/.next/server/app/api/trpc/[trpc]/route.js:1:4007
      at async Promise.all (index 0)
      at async g (/app/apps/web/.next/server/app/api/trpc/[trpc]/route.js:1:4333) {
    issues: [ [Object] ],
    addIssue: [Function (anonymous)],
    addIssues: [Function (anonymous)],
    errors: [ [Object] ]
  }
}

Ref - https://github.com/hoarder-app/hoarder/blob/8b69cddfb92b3b7548d3f90dbec1038c728ea5d9/packages/shared/types/bookmarks.ts#L5

Is there a reason that the title for a bookmark was limited to 100 chars?

Or could we up that to 255?

kamtschatka commented 2 weeks ago
  1. We also have a discord channel if you want to talk directly to us ;-)
  2. My guess is just to have a limit and the number is either arbitrary or chosen to not overload the UI