Skip to main content

A Python package to manage error codes for multiple microservices

Project description

Centralized Error Codes

Overview

This repository provides a centralized collection of error codes that can be used across multiple microservices. It is designed to standardize error handling for both Node.js and Python-based applications.

Publishing a New Node Module

Follow these steps to publish a new version of the module:

  1. Install dependencies:
    npm i --save-dev @types/node
    
  2. Build the project:
    npm run build
    
  3. Package the module:
    npm pack
    
  4. Publish the package to npm (ensure you are logged in):
    npm publish --access public
    
    If not logged in, run:
    npm login
    

Installation

To use this package in a Node.js application, install it via npm:

npm install central-error-codes

Usage in Node.js

Import and use the error codes in your application:

import { ErrorCode } from "central-error-codes";

const ALL_ERROR_CODE = ErrorCode.getAllErrors();
const CMS_ERROR_CODE = ErrorCode.getCMSGatewayError();

Usage in Python

For Python-based applications, usage instructions will be provided in a future update. To publish new version pip install setuptools wheel twine python3 setup.py sdist bdist_wheel python3 -m build

twine upload dist/*

License

This project is licensed under the MIT License.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

central_error_codes-1.5.1.tar.gz (6.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

central_error_codes-1.5.1-py3-none-any.whl (6.8 kB view details)

Uploaded Python 3

File details

Details for the file central_error_codes-1.5.1.tar.gz.

File metadata

  • Download URL: central_error_codes-1.5.1.tar.gz
  • Upload date:
  • Size: 6.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.3

File hashes

Hashes for central_error_codes-1.5.1.tar.gz
Algorithm Hash digest
SHA256 66985cd59fa8d0bd3d682f0e0ab76ecd1a066478cf184c513cca701c779a366a
MD5 8b06874b6b74c80438103fc62146f835
BLAKE2b-256 045087890fac1c429a71833c867965ed93a21a04ef15793a7c86bf4c1ce0348e

See more details on using hashes here.

File details

Details for the file central_error_codes-1.5.1-py3-none-any.whl.

File metadata

File hashes

Hashes for central_error_codes-1.5.1-py3-none-any.whl
Algorithm Hash digest
SHA256 8841d05c0e894939caabdfa9a8b374353782b0e16e334cfcaa5763f4d4edb737
MD5 e20a09d8b39167d7b15e548fb39d93f2
BLAKE2b-256 4a711c7af7d01252380b0442a7d212ed2459dd99bb246fdbd2658b8a5f80d7f5

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page