Skip to content

Commit

Permalink
πŸ”Š Log to help debug todos without note uri
Browse files Browse the repository at this point in the history
  • Loading branch information
homostellaris committed Jul 9, 2024
1 parent 4cff744 commit b15a574
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion components/notes/providers/Stashpad.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,13 @@ export default class Stashpad extends NoteProvider {
}),
})
.then(response => response.json())
.then(({ uri }) => uri)
.then(responseBody => {
if (!responseBody.uri) {
throw new Error(
`Failed to create note: ${JSON.stringify(responseBody, null, 2)}`,
)
}
return responseBody.uri
})
}
}

0 comments on commit b15a574

Please sign in to comment.