Skip to content

Commit

Permalink
Improve error message: E035: Failed to create the following bookmark …
Browse files Browse the repository at this point in the history
…on the server: [object Object]

If the sync fails due to wrongly escaped characters, you often get the error message:
E035: Failed to create the following bookmark on the server: [object Object]

Stringify the bookmark object to help the user to guess which bookmark could cause the problem
  • Loading branch information
mfechner authored Jun 12, 2024
1 parent 703e3af commit 6835af5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/errors/Error.ts
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,7 @@ export class FileUnreadableError extends FloccusError {
export class CreateBookmarkError extends FloccusError {
public bookmark: Bookmark
constructor(bookmark: Bookmark) {
super(`E035: Failed to create the following bookmark on the server: ${bookmark}`)
super(`E035: Failed to create the following bookmark on the server: ${JSON.stringify(bookmark)}`)
this.code = 35
this.bookmark = bookmark
Object.setPrototypeOf(this, CreateBookmarkError.prototype)
Expand Down

0 comments on commit 6835af5

Please sign in to comment.