Skip to main content

StatusFlow

Bilingual HTTP error handling library with custom exceptions and uniform responses for Node.js/Express APIs

Key Features

HTTP Exceptions

Custom HTTP exception classes with TypeScript support for clean error handling

Bilingual Responses

Built-in Spanish and English response system with comprehensive HTTP status metadata

Express Middleware

Ready-to-use middleware for uniform error handling in Express applications

TypeScript First

Full TypeScript support with type-safe APIs and auto-completion

Quick Start

Installation

Get started with StatusFlow in your Node.js project

Quickstart Guide

Build your first error-handled endpoint in minutes

Express Integration

Learn how to integrate StatusFlow with your Express application

API Reference

Explore the complete API documentation

Example Usage

import { BadRequestException, httpErrorMiddleware, createSuccessResponse } from 'status-flow';

app.get('/user/:id', (req, res) => {
  if (!req.params.id) {
    throw new BadRequestException('User ID is required');
  }
  
  res.json(createSuccessResponse({ id: req.params.id, name: 'John' }, 'User found'));
});

// Add error handling middleware
app.use(httpErrorMiddleware);

Why StatusFlow?

StatusFlow simplifies HTTP error handling in Node.js APIs by providing:
  • Consistent error responses across your entire API
  • Bilingual support for Spanish and English audiences
  • Type-safe exception classes that work seamlessly with TypeScript
  • Zero configuration middleware that just works
  • Comprehensive HTTP status catalog with metadata and best practices

Build docs developers (and LLMs) love