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-8/

{
  "context": "Evaluates whether buildHttpError selects the correct HTTP-style error classes from @backstage/errors for each RequestIssue kind and preserves provided messages and causes. Emphasizes correct mapping to the library's standardized errors rather than general error handling. Scoring assumes a TypeScript implementation that constructs and returns the dependency's error instances.",
  "type": "weighted_checklist",
  "checklist": [
    {
      "name": "Bad request class",
      "description": "buildHttpError returns an InputError instance for kind \"badRequest\", using the provided message and passing through the optional cause.",
      "max_score": 20
    },
    {
      "name": "Auth class",
      "description": "buildHttpError returns an AuthenticationError instance for kind \"unauthenticated\", initialized with the given message and optional cause.",
      "max_score": 20
    },
    {
      "name": "Forbidden class",
      "description": "buildHttpError returns a NotAllowedError instance for kind \"forbidden\", preserving the supplied message and optional cause.",
      "max_score": 20
    },
    {
      "name": "Missing resource class",
      "description": "buildHttpError returns a NotFoundError instance for kind \"notFound\", constructed with the provided message and optional cause.",
      "max_score": 20
    },
    {
      "name": "Conflict class",
      "description": "buildHttpError returns a ConflictError instance for kind \"conflict\", using the provided message and optional cause.",
      "max_score": 15
    },
    {
      "name": "Cause chaining",
      "description": "Every returned error preserves the cause in the CustomErrorBase constructor so it is accessible via the cause property and reflected in the message where the library supports it.",
      "max_score": 5
    }
  ]
}

Install with Tessl CLI

npx tessl i tessl/npm-backstage--errors

tile.json