npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

supabase-error-translator-js

v3.1.0

Published

A comprehensive Supabase error code translator supporting 10 languages with ISO language codes

Readme

Supabase Error Translator JS

A small TypeScript package that translates Supabase error codes into user-facing messages across 10 languages.

Disclaimer: This project is maintained independently. It is not officially associated with, endorsed by, or affiliated with Supabase.

npm version npm downloads License: MIT Docs CI CodeQL

About

supabase-error-translator-js maps Supabase Auth, Storage, Realtime, and database error codes to localized text. It does not call Supabase and has no runtime dependency on @supabase/supabase-js.

Supported languages:

| Language | Code | Native Name | | ---------- | ---- | ----------- | | English | en | English | | Arabic | ar | العربية | | German | de | Deutsch | | Spanish | es | Espanol | | French | fr | Francais | | Japanese | ja | Japanese | | Korean | ko | Korean | | Polish | pl | Polski | | Portuguese | pt | Portugues | | Chinese | zh | Chinese |

Supported service keys:

auth, storage, realtime, database, functions

functions is accepted by the API, but its translation maps are currently empty and will return the unknown-error fallback.

Supported Error Codes

The library supports numerous Supabase error codes, including but not limited to:

  • Auth
    • Authentication errors: invalid credentials, email not confirmed, and related sign-in failures
    • User management errors: user not found, already exists, and identity conflicts
    • Rate limiting errors: too many requests, email send rate limits, and SMS send limits
    • MFA-related errors: expired challenges, failed verification, and disabled factors
    • OAuth and SSO errors: disabled providers, bad callbacks, and SAML/SSO configuration issues
  • Realtime
    • Configuration errors: disabled realtime, tenant not found, and table setup issues
    • Connection errors: WebSocket connection and authorization failures
    • Rate limiting errors: channel, connection, and join rate limits
    • Database errors: CDC stream, replication slot, and subscription failures
    • System errors: node disconnection, migration failures, and counter tracking errors
  • Storage
    • Resource errors: bucket, file, upload, and key not found or already exists
    • Authorization errors: invalid tokens, invalid signatures, and access denied
    • Validation errors: invalid parameters, bucket names, keys, ranges, and MIME types
    • Service limitations: size limits, credential limits, locks, and request slowdown
    • Infrastructure errors: database timeouts, database errors, and internal errors
  • Database
    • Connection errors: server disconnections, inactive connections, and failed connections
    • Data type errors: type mismatches, invalid conversions, overflow, and invalid dates
    • Constraint violations: unique, foreign key, not-null, and check constraints
    • Access and authentication errors: permission denied and authentication failures
    • Resource limitations: memory, disk, connection, and program limits
    • Query syntax issues: syntax errors, invalid names, missing objects, and ambiguous references
    • Transaction errors: serialization failures, deadlocks, and aborted transactions
    • PostgREST-specific errors: JWT validation, schema visibility, and API request issues
    • Server-side errors: assertions, unavailable resources, cancellations, and timeouts

Each error code is translated according to the specified language.

Install

npm install supabase-error-translator-js
pnpm add supabase-error-translator-js
yarn add supabase-error-translator-js

Quick Start

import { translateErrorCode } from 'supabase-error-translator-js';

const message = translateErrorCode('invalid_credentials', 'auth', 'de');

Set a default language:

import { setLanguage, translateErrorCode } from 'supabase-error-translator-js';

setLanguage('es');

const message = translateErrorCode('email_not_confirmed', 'auth');

For request-scoped server code, prefer passing the language directly to translateErrorCode() instead of using the module-level default.

Documentation

The manual covers installation, language handling, fallback behavior, API reference, examples, and migration guides:

API

import {
  getCurrentLanguage,
  getSupportedLanguages,
  isSupportedLanguage,
  isSupportedService,
  setLanguage,
  translateErrorCode,
  SUPPORTED_LANGUAGES,
  SUPPORTED_SERVICES,
  type ErrorService,
  type SupportedLanguage,
} from 'supabase-error-translator-js';

Changelog

See CHANGELOG.md for release notes and migration details.

Contributing

Contributions are welcome. See CONTRIBUTING.md for the development workflow.

License

This project is licensed under the MIT License.