CtrlK
BlogDocsLog inGet started
Tessl Logo

tessl/npm-backstage--errors

Common utilities for error handling within Backstage with structured error classes and serialization functions

63

1.28x
Overview
Eval results
Files

rubric.jsonevals/scenario-4/

{
  "context": "Evaluates how well the solution uses @backstage/errors to wrap, forward, filter, and serialize errors for the Wrapped Error Toolkit spec. Focus is on leveraging the package APIs for cause-aware messages and round-trip-safe payloads with optional stack sharing.",
  "type": "weighted_checklist",
  "checklist": [
    {
      "name": "Base wrapper",
      "description": "createServiceError is implemented atop CustomErrorBase (or a subclass) so it captures stack traces, auto-sets the error name, appends stringified cause details to messages (e.g., \"Gateway timeout: db offline\"), and retains `cause` only when isError recognizes a real Error.",
      "max_score": 25
    },
    {
      "name": "Cause filtering",
      "description": "Unknown inputs are validated with assertError or isError; non-error causes (like strings or numbers) are excluded from the `cause` chain but still reflected in the constructed message via stringifyError-like handling.",
      "max_score": 15
    },
    {
      "name": "Forwarded context",
      "description": "forwardUpstreamError uses ForwardedError (or equivalent composition) to inherit the upstream error name, retain the original `cause`, and prefix the local context message while throwing via assertError on non-error inputs.",
      "max_score": 20
    },
    {
      "name": "Serialization default",
      "description": "serializeForTransport delegates to serializeError without includeStack so that the output includes name/message and nested causes but omits stack properties, matching the expected JSON-friendly shape.",
      "max_score": 20
    },
    {
      "name": "Stack opt-in",
      "description": "When includeStack is true, serializeForTransport passes includeStack: true to serializeError so both the root error and nested causes carry stack strings in the payload.",
      "max_score": 10
    },
    {
      "name": "Roundtrip rebuild",
      "description": "deserializeFromTransport reconstructs errors using deserializeError, restoring names, messages, and nested causes from the serialized payload to satisfy the roundtrip tests.",
      "max_score": 10
    }
  ]
}

Install with Tessl CLI

npx tessl i tessl/npm-backstage--errors

tile.json