Skip to content
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

Web page shows generic error message if you try to add a duplicate bookmark #179

Closed
skirmess opened this issue May 25, 2024 · 6 comments
Closed
Labels
bug Something isn't working

Comments

@skirmess
Copy link

skirmess commented May 25, 2024

Trying to add a bookmark, which already exists, from the web page shows this error message:

image

The server log shows:

web-1          | s [TRPCError]: Bookmark e8kgxwkflas1hw75h92v7303 is already in the list saq2f0uqazppijovqcqbezj8
web-1          |     at /app/apps/web/.next/server/chunks/838.js:1:20346
web-1          |     at async c.middlewares (/app/apps/web/.next/server/chunks/673.js:4823:10163)
web-1          |     at async a (/app/apps/web/.next/server/chunks/673.js:4823:9557)
web-1          |     at async a (/app/apps/web/.next/server/chunks/673.js:4823:9557)
web-1          |     at async a (/app/apps/web/.next/server/chunks/673.js:4823:9557)
web-1          |     at async a (/app/apps/web/.next/server/chunks/673.js:4823:9557)
web-1          |     at async a (/app/apps/web/.next/server/chunks/673.js:4823:9557)
web-1          |     at async a (/app/apps/web/.next/server/chunks/673.js:4823:9557)
web-1          |     at async t (/app/apps/web/.next/server/chunks/673.js:4823:9896)
web-1          |     at async /app/apps/web/.next/server/app/api/trpc/[trpc]/route.js:1:4281 {
web-1          |   code: 'BAD_REQUEST',
web-1          |   [cause]: undefined

Ideally, the web page should mention the reason why the bookmark wasn't added.

@MohamedBassem MohamedBassem added the bug Something isn't working label May 25, 2024
@kamtschatka
Copy link
Collaborator

are you using the latest version? (0.14) You can check on the admin page.
That has link deduplication and should look like this:
image

If yes, how did you add it?

@skirmess
Copy link
Author

Yes, I'm using 0.14.0.

Steps to reproduce:

  • Click on Home
  • Create a bookmark, e.g.: https://duckduckgo.com/

The bookmark is added

image

  • Create a new list, e.g.: test list

  • In the list, add the bookmark
    image

  • You get the message you mentioned and the existing bookmark is added to this list (this is awesome!!!)
    image

  • Now try to add the bookmark again to the list and you get my error message:

image

@kamtschatka
Copy link
Collaborator

image

It is quite technical, but still understandable I would say? At this point of the code we only have the id of the bookmark and the id of the list, so this is the best we can get, without doing another query on the database to provide more information.

@skirmess
Copy link
Author

skirmess commented Jun 4, 2024

I guess you could also just say "Bookmark is already in this list". This would only show when you try to add a bookmark to a specific list and it exists already in this list. You already know which list - the one you try to add it to.

@kamtschatka
Copy link
Collaborator

I also considered that, but there is now also multi url import, so it might become a bit confusing if you try to add multiple bookmarks and you only get 10 messages with "Bookmark is already in this list".
Maybe "bookmark is already in this list"?

@skirmess
Copy link
Author

skirmess commented Jun 4, 2024

I'm also fine with the cryptic message. :-) It does show that the issue is the user and not the software. :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants