extensions icon indicating copy to clipboard operation
extensions copied to clipboard

Pass Through Original Error Text

Open a-laughlin opened this issue 10 months ago • 2 comments
trafficstars

Extension

https://www.raycast.com/Codely/google-chrome

Raycast Version

any

macOS Version

any

Description

Creating this as a separate issue to avoid blocking #16287

useBookmarkSearch and useHistorySearch throw out upstream errors (useBookmarkSearch), or don't handle them (useHistorySearch). That prevents messages which can be useful to users for debugging their issues, resulting in additional bug reports. It also requires the hooks to know about all upstream errors, which adds additional complexity and coupling.

The goal of this issue is to pass through original messages wherever they're created, logging them in the hook, along with cleanup of unused constants and such. Making error handling consistent for both cases would be helpful.

Error handling guidelines at https://developers.raycast.com/information/best-practices#handle-errors

Example

A missing profile when searching bookmarks will currently show src/constants.ts:

# 🚨Error: Something happened while trying to run your command

Instead of the more useful error text from src/util/index.ts:

`The profile path ${resolvedProfilePath} does not exist. Please check your Chrome profile location by visiting chrome://version -> Profile Path. Then update it in Extension Settings -> Profile Path.`;

a-laughlin avatar Jan 13 '25 03:01 a-laughlin

Thank you for opening this issue!

🔔 @rgomezcasas @bromanko @crisboarna @andreaselia @rtyke @karolre @Aiee @nagauta @tleo19 @Tarocch1 you might want to have a look.

💡 Author and Contributors commands

The author and contributors of Codely/google-chrome can trigger bot actions by commenting:

  • @raycastbot close this issue Closes the issue.
  • @raycastbot close as not planned Closes the issue as not planned.
  • @raycastbot rename this issue to "Awesome new title" Renames the issue.
  • @raycastbot reopen this issue Reopens the issue.
  • @raycastbot assign me Assigns yourself to the issue.
  • @raycastbot good first issue Adds the "Good first issue" label to the issue.
  • @raycastbot keep this issue open Make sure the issue won't go stale and will be kept open by the bot.

raycastbot avatar Jan 13 '25 03:01 raycastbot

@raycastbot keep this issue open

a-laughlin avatar Jan 13 '25 04:01 a-laughlin