Skip to content

About

RFC 9457 problem details helpers for Node.js APIs.

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

4 Commits

Folders and files

Repository files navigation

@sandsoftwaresolutions/problem-details

Small, dependency-free helpers for RFC 9457 Problem Details JSON errors.

npm install @sandsoftwaresolutions/problem-details

Works with import and require(), and ships TypeScript types for both.

import { problemResponse } from "@sandsoftwaresolutions/problem-details";

return problemResponse({ status: 422, detail: "Validation failed", errors: { email: "Invalid address" } });

createProblem creates a consistent error payload; problemResponse returns a fetch-compatible response with application/problem+json; ProblemDetailsError lets application code intentionally throw a public API error; fromError converts unknown failures to a safe generic 500 without leaking internals.

About

RFC 9457 problem details helpers for Node.js APIs.

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages