Skip to content

feat: add operation context to all error handlers#121

Open
zjpiazza wants to merge 1 commit into
directus-labs:mainfrom
Face-to-Face-IT:feat/error-context
Open

feat: add operation context to all error handlers#121
zjpiazza wants to merge 1 commit into
directus-labs:mainfrom
Face-to-Face-IT:feat/error-context

Conversation

@zjpiazza

Copy link
Copy Markdown

Enhances error handling by adding operation context to all catchError calls in extract and load modules. This provides better debugging information when errors occur.

Changes:

  • Added {context: {operation: 'function_name'}, fatal: true} to all catchError calls in extract-.ts and load-.ts files
  • Individual file errors (e.g., file downloads) use fatal: false to allow batch operations to continue

This enables better error tracking and debugging in production by identifying exactly which operation failed. I was regularly having issues when extracting or applying templates and it wasn't immediately obvious where the failure was occurring.

Enhances error handling by adding operation context to all catchError
calls in extract and load modules. This provides better debugging
information when errors occur.

Changes:
- Added {context: {operation: 'function_name'}, fatal: true} to all
  catchError calls in extract-*.ts and load-*.ts files
- Individual file errors (e.g., file downloads) use fatal: false to
  allow batch operations to continue

This enables better error tracking and debugging in production by
identifying exactly which operation failed.
Copilot AI review requested due to automatic review settings January 21, 2026 22:16
@zjpiazza zjpiazza changed the title feat(errors): add operation context to all error handlers feat: add operation context to all error handlers Jan 21, 2026

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 34 out of 34 changed files in this pull request and generated no new comments.

Comments suppressed due to low confidence (5)

src/lib/load/load-users.ts:1

  • The indentation is inconsistent. The context object should be aligned with the opening brace of catchError's second argument.
    src/lib/load/load-translations.ts:1
  • The indentation is inconsistent. The context object should be aligned with the opening brace of catchError's second argument.
    src/lib/load/load-settings.ts:1
  • The indentation is inconsistent. The context object should be aligned with the opening brace of catchError's second argument.
    src/lib/load/load-roles.ts:1
  • The indentation is inconsistent. The context object should be aligned with the opening brace of catchError's second argument.
    src/lib/load/load-roles.ts:1
  • The indentation is inconsistent. The context object should be aligned with the opening brace of catchError's second argument.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants