agentsclimarketplace

Error handling

Skill nexus-labs-automation/backend-observability/skills/error-handling

Capture errors with rich context for debugging and alertingFrom its SKILL.md

Install
npx -y skills add nexus-labs-automation/backend-observability --skill error-handling

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

One thing to look at

  • 2 stars2 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.

SKILL.md

1.9 KB, as published. Nobody here has run it

Error Handling

An error without context is useless. Every error should answer: What, Where, Who, When, Why.

Required Attributes

AttributeExampleRequired
error.typeValidationError, TimeoutErrorYes
error.message"Invalid email format"Yes
exception.stacktraceFull stack traceYes
job.namecheckout, signupRecommended
job.steppayment, validationRecommended

Error Classification

LevelStatusAction
Critical500Page immediately
Error500Alert, investigate
Warning4xxTrack, batch review
Info-Log only

Structured Error Type

AppError {
  Type       string   // "validation", "timeout"
  Message    string   // Human-readable
  Code       string   // For grouping
  Retryable  bool     // Can retry?
  Context    map      // Additional context
}

Capture Pattern

On error:
  → Record error on span with error.type, job.name, job.step
  → Set span status to Error
  → Log structured error with trace_id
  → Increment error counter by type/job/step

Fingerprinting

Group by: error type + message (without dynamic data) + top stack frames

Strip from fingerprints: user IDs, request IDs, timestamps, tokens

Anti-Patterns

  • Swallowing errors → Log before returning default
  • Missing context → Add job.name, job.step, retry.count
  • PII in messages → Use structured attributes, not interpolation
  • No retry context → Include attempt count and will_retry

References

  • references/methodology/jtbd-for-backend.md
  • references/anti-patterns.md

Keep looking

Skills are one crate of 627,801. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.