返回 Skill 列表
extension
分类: 开发与工程无需 API Key

handling-global-errors

统一的策略来捕获和显示API及网络错误。在整个应用程序逻辑中使用。

person作者: jakexiaohubgithub

Global Error Handling System

When to use this skill

  • Wrapping server actions.
  • Client-side API calls.
  • Handling 404/500 pages.

Workflow

  • [ ] Use try-catch blocks.
  • [ ] Parse Appwrite errors (code 401, 404, etc.).
  • [ ] Trigger Toast notification with user-friendly message.
  • [ ] Log technical errors to a service (optional).

Instructions

  • User Friendly: Never show "Internal Server Error" to a user; show "Something went wrong on our end, please try again."
  • Specifics: Distinguish between "Wrong Password" and "Server Unreachable".