errors

package
v1.0.6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 2, 2025 License: MIT Imports: 2 Imported by: 0

README

Shared Error Definitions

This directory contains centralized error definitions for all domains in the project. It is structured by feature/module to maintain clarity and separation of concerns.

Structure

Each module has its own folder with the following convention:

  • api_<module>_errors.go — for HTTP/API-related errors.
  • repo_<module>_errors.go — for repository/database-related errors.
  • service_<module>_errors.go — for service/business logic-related errors.
  • README.md — brief explanation per module.

This structure allows better error management and decouples concerns between layers (API, Service, Repository).

Modules

  • auth_errors
  • card_errors
  • merchant_errors
  • merchant_document_errors
  • refresh_token_errors
  • role_errors
  • saldo_errors
  • topup_errors
  • transaction_errors
  • transfer_errors
  • user_errors
  • user_role_errors
  • withdraw_errors

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GrpcErrorToJson

func GrpcErrorToJson(err *pb.ErrorResponse) string

GrpcErrorToJson takes a pointer to a gRPC ErrorResponse and returns a string containing the JSON representation of the error.

The function does not return an error and instead panics if the marshaling fails.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL