{"modulePath":"github.com/MamangRust/monolith-payment-gateway-shared","version":"v1.0.15","isLatest":false,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package transactionapierrors\n\n## Variables\n\n```go\nvar ErrApiBindCreateTransaction = func(c echo.Context) error {\n\treturn response.NewApiErrorResponse(c, \"error\", \"bind failed: invalid create transaction request\", http.StatusBadRequest)\n}\n```\nErrApiBindCreateTransaction returns an API error response when binding the create transaction request body to struct fails.\n\n```go\nvar ErrApiBindUpdateTransaction = func(c echo.Context) error {\n\treturn response.NewApiErrorResponse(c, \"error\", \"bind failed: invalid update transaction request\", http.StatusBadRequest)\n}\n```\nErrApiBindUpdateTransaction returns an API error response when binding the update transaction request body to struct fails.\n\n```go\nvar ErrApiFailedCreateTransaction = func(c echo.Context) error {\n\treturn response.NewApiErrorResponse(c, \"error\", \"Failed to create transaction\", http.StatusInternalServerError)\n}\n```\nErrApiFailedCreateTransaction returns an API error response when creating a new transaction fails.\n\n```go\nvar ErrApiFailedDeleteAllPermanent = func(c echo.Context) error {\n\treturn response.NewApiErrorResponse(c, \"error\", \"Failed to permanently delete all trashed transactions\", http.StatusInternalServerError)\n}\n```\nErrApiFailedDeleteAllPermanent returns an API error response when permanently deleting all trashed transactions fails.\n\n```go\nvar ErrApiFailedDeletePermanent = func(c echo.Context) error {\n\treturn response.NewApiErrorResponse(c, \"error\", \"Failed to permanently delete transaction\", http.StatusInternalServerError)\n}\n```\nErrApiFailedDeletePermanent returns an API error response when permanently deleting a transaction fails.\n\n```go\nvar ErrApiFailedFindActive = func(c echo.Context) error {\n\treturn response.NewApiErrorResponse(c, \"error\", \"Failed to fetch active transactions\", http.StatusInternalServerError)\n}\n```\nErrApiFailedFindActive returns an API error response when retrieving active (non-deleted) transactions fails.\n\n```go\nvar ErrApiFailedFindAllTransactions = func(c echo.Context) error {\n\treturn response.NewApiErrorResponse(c, \"error\", \"Failed to fetch all transactions\", http.StatusInternalServerError)\n}\n```\nErrApiFailedFindAllTransactions returns an API error response when fetching all transactions from the database fails.\n\n```go\nvar ErrApiFailedFindAllTransactionsActive = func(c echo.Context) error {\n\treturn response.NewApiErrorResponse(c, \"error\", \"Failed to fetch all transactions active\", http.StatusInternalServerError)\n}\n```\nErrApiFailedFindAllTransactionsActive returns an API error response when fetching active (non-deleted) transactions fails.\n\n```go\nvar ErrApiFailedFindAllTransactionsTrashed = func(c echo.Context) error {\n\treturn response.NewApiErrorResponse(c, \"error\", \"Failed to fetch all transactions active\", http.StatusInternalServerError)\n}\n```\nErrApiFailedFindAllTransactionsTrashed returns an API error response when fetching trashed (soft-deleted) transactions fails.\n\n```go\nvar ErrApiFailedFindByCardNumber = func(c echo.Context) error {\n\treturn response.NewApiErrorResponse(c, \"error\", \"Failed to fetch transactions by card number\", http.StatusInternalServerError)\n}\n```\nErrApiFailedFindByCardNumber returns an API error response when fetching transactions filtered by card number fails.\n\n```go\nvar ErrApiFailedFindById = func(c echo.Context) error {\n\treturn response.NewApiErrorResponse(c, \"error\", \"Failed to fetch transaction by ID\", http.StatusInternalServerError)\n}\n```\nErrApiFailedFindById returns an API error response when fetching a transaction by its ID fails.\n\n```go\nvar ErrApiFailedFindByMerchantID = func(c echo.Context) error {\n\treturn response.NewApiErrorResponse(c, \"error\", \"Failed to fetch transactions by merchant ID\", http.StatusInternalServerError)\n}\n```\nErrApiFailedFindByMerchantID returns an API error response when retrieving transactions by merchant ID fails.\n\n```go\nvar ErrApiFailedFindTrashed = func(c echo.Context) error {\n\treturn response.NewApiErrorResponse(c, \"error\", \"Failed to fetch trashed transactions\", http.StatusInternalServerError)\n}\n```\nErrApiFailedFindTrashed returns an API error response when retrieving trashed (soft-deleted) transactions fails.\n\n```go\nvar ErrApiFailedMonthlyAmounts = func(c echo.Context) error {\n\treturn response.NewApiErrorResponse(c, \"error\", \"Failed to fetch monthly amounts\", http.StatusInternalServerError)\n}\n```\nErrApiFailedMonthlyAmounts returns an API error response when retrieving total monthly transaction amounts fails.\n\n```go\nvar ErrApiFailedMonthlyAmountsByCard = func(c echo.Context) error {\n\treturn response.NewApiErrorResponse(c, \"error\", \"Failed to fetch monthly amounts by card number\", http.StatusInternalServerError)\n}\n```\nErrApiFailedMonthlyAmountsByCard returns an API error response when retrieving total monthly transaction amounts by card number fails.\n\n```go\nvar ErrApiFailedMonthlyFailed = func(c echo.Context) error {\n\treturn response.NewApiErrorResponse(c, \"error\", \"Failed to fetch monthly failed transactions\", http.StatusInternalServerError)\n}\n```\nErrApiFailedMonthlyFailed returns an API error response when retrieving monthly failed transactions fails.\n\n```go\nvar ErrApiFailedMonthlyFailedByCard = func(c echo.Context) error {\n\treturn response.NewApiErrorResponse(c, \"error\", \"Failed to fetch monthly failed transactions by card number\", http.StatusInternalServerError)\n}\n```\nErrApiFailedMonthlyFailedByCard returns an API error response when retrieving monthly failed transactions by card number fails.\n\n```go\nvar ErrApiFailedMonthlyMethods = func(c echo.Context) error {\n\treturn response.NewApiErrorResponse(c, \"error\", \"Failed to fetch monthly payment methods\", http.StatusInternalServerError)\n}\n```\nErrApiFailedMonthlyMethods returns an API error response when retrieving monthly payment methods fails.\n\n```go\nvar ErrApiFailedMonthlyMethodsByCard = func(c echo.Context) error {\n\treturn response.NewApiErrorResponse(c, \"error\", \"Failed to fetch monthly payment methods by card number\", http.StatusInternalServerError)\n}\n```\nErrApiFailedMonthlyMethodsByCard returns an API error response when retrieving monthly payment methods by card number fails.\n\n```go\nvar ErrApiFailedMonthlySuccess = func(c echo.Context) error {\n\treturn response.NewApiErrorResponse(c, \"error\", \"Failed to fetch monthly successful transactions\", http.StatusInternalServerError)\n}\n```\nErrApiFailedMonthlySuccess returns an API error response when retrieving monthly successful transactions fails.\n\n```go\nvar ErrApiFailedMonthlySuccessByCard = func(c echo.Context) error {\n\treturn response.NewApiErrorResponse(c, \"error\", \"Failed to fetch monthly successful transactions by card number\", http.StatusInternalServerError)\n}\n```\nErrApiFailedMonthlySuccessByCard returns an API error response when retrieving monthly successful transactions by card number fails.\n\n```go\nvar ErrApiFailedRestoreAllTransactions = func(c echo.Context) error {\n\treturn response.NewApiErrorResponse(c, \"error\", \"Failed to restore all transactions\", http.StatusInternalServerError)\n}\n```\nErrApiFailedRestoreAllTransactions returns an API error response when restoring all trashed transactions fails.\n\n```go\nvar ErrApiFailedRestoreTransaction = func(c echo.Context) error {\n\treturn response.NewApiErrorResponse(c, \"error\", \"Failed to restore transaction\", http.StatusInternalServerError)\n}\n```\nErrApiFailedRestoreTransaction returns an API error response when restoring a soft-deleted transaction fails.\n\n```go\nvar ErrApiFailedTrashTransaction = func(c echo.Context) error {\n\treturn response.NewApiErrorResponse(c, \"error\", \"Failed to move transaction to trash\", http.StatusInternalServerError)\n}\n```\nErrApiFailedTrashTransaction returns an API error response when moving a transaction to trash (soft-delete) fails.\n\n```go\nvar ErrApiFailedUpdateTransaction = func(c echo.Context) error {\n\treturn response.NewApiErrorResponse(c, \"error\", \"Failed to update transaction\", http.StatusInternalServerError)\n}\n```\nErrApiFailedUpdateTransaction returns an API error response when updating an existing transaction fails.\n\n```go\nvar ErrApiFailedYearlyAmounts = func(c echo.Context) error {\n\treturn response.NewApiErrorResponse(c, \"error\", \"Failed to fetch yearly amounts\", http.StatusInternalServerError)\n}\n```\nErrApiFailedYearlyAmounts returns an API error response when retrieving total yearly transaction amounts fails.\n\n```go\nvar ErrApiFailedYearlyAmountsByCard = func(c echo.Context) error {\n\treturn response.NewApiErrorResponse(c, \"error\", \"Failed to fetch yearly amounts by card number\", http.StatusInternalServerError)\n}\n```\nErrApiFailedYearlyAmountsByCard returns an API error response when retrieving total yearly transaction amounts by card number fails.\n\n```go\nvar ErrApiFailedYearlyFailed = func(c echo.Context) error {\n\treturn response.NewApiErrorResponse(c, \"error\", \"Failed to fetch yearly failed transactions\", http.StatusInternalServerError)\n}\n```\nErrApiFailedYearlyFailed returns an API error response when retrieving yearly failed transactions fails.\n\n```go\nvar ErrApiFailedYearlyFailedByCard = func(c echo.Context) error {\n\treturn response.NewApiErrorResponse(c, \"error\", \"Failed to fetch yearly failed transactions by card number\", http.StatusInternalServerError)\n}\n```\nErrApiFailedYearlyFailedByCard returns an API error response when retrieving yearly failed transactions by card number fails.\n\n```go\nvar ErrApiFailedYearlyMethods = func(c echo.Context) error {\n\treturn response.NewApiErrorResponse(c, \"error\", \"Failed to fetch yearly payment methods\", http.StatusInternalServerError)\n}\n```\nErrApiFailedYearlyMethods returns an API error response when retrieving yearly payment methods fails.\n\n```go\nvar ErrApiFailedYearlyMethodsByCard = func(c echo.Context) error {\n\treturn response.NewApiErrorResponse(c, \"error\", \"Failed to fetch yearly payment methods by card number\", http.StatusInternalServerError)\n}\n```\nErrApiFailedYearlyMethodsByCard returns an API error response when retrieving yearly payment methods by card number fails.\n\n```go\nvar ErrApiFailedYearlySuccess = func(c echo.Context) error {\n\treturn response.NewApiErrorResponse(c, \"error\", \"Failed to fetch yearly successful transactions\", http.StatusInternalServerError)\n}\n```\nErrApiFailedYearlySuccess returns an API error response when retrieving yearly successful transactions fails.\n\n```go\nvar ErrApiFailedYearlySuccessByCard = func(c echo.Context) error {\n\treturn response.NewApiErrorResponse(c, \"error\", \"Failed to fetch yearly successful transactions by card number\", http.StatusInternalServerError)\n}\n```\nErrApiFailedYearlySuccessByCard returns an API error response when retrieving yearly successful transactions by card number fails.\n\n```go\nvar ErrApiInvalidMonth = func(c echo.Context) error {\n\treturn response.NewApiErrorResponse(c, \"error\", \"Invalid month value\", http.StatusBadRequest)\n}\n```\nErrApiInvalidMonth returns an API error response when the month value is missing, invalid, or out of range.\n\n```go\nvar ErrApiInvalidTransactionApiKey = func(c echo.Context) error {\n\treturn response.NewApiErrorResponse(c, \"error\", \"Invalid transaction api-key\", http.StatusBadRequest)\n}\n```\nErrApiInvalidTransactionApiKey returns an API error response when the transaction API key is missing or invalid.\n\n```go\nvar ErrApiInvalidTransactionCardNumber = func(c echo.Context) error {\n\treturn response.NewApiErrorResponse(c, \"error\", \"Invalid transaction Card Number\", http.StatusBadRequest)\n}\n```\nErrApiInvalidTransactionCardNumber returns an API error response when the provided transaction card number is invalid.\n\n```go\nvar ErrApiInvalidTransactionID = func(c echo.Context) error {\n\treturn response.NewApiErrorResponse(c, \"error\", \"Invalid transaction ID\", http.StatusBadRequest)\n}\n```\nErrApiInvalidTransactionID returns an API error response when the transaction ID is invalid or improperly formatted.\n\n```go\nvar ErrApiInvalidTransactionMerchantID = func(c echo.Context) error {\n\treturn response.NewApiErrorResponse(c, \"error\", \"Invalid transaction merchant ID\", http.StatusBadRequest)\n}\n```\nErrApiInvalidTransactionMerchantID returns an API error response when the provided merchant ID for the transaction is invalid.\n\n```go\nvar ErrApiInvalidYear = func(c echo.Context) error {\n\treturn response.NewApiErrorResponse(c, \"error\", \"Invalid year value\", http.StatusBadRequest)\n}\n```\nErrApiInvalidYear returns an API error response when the year value is missing, invalid, or out of range.\n\n```go\nvar ErrApiValidateCreateTransaction = func(c echo.Context) error {\n\treturn response.NewApiErrorResponse(c, \"error\", \"validation failed: invalid create transaction request\", http.StatusBadRequest)\n}\n```\nErrApiValidateCreateTransaction returns an API error response when validation of the create transaction request fails.\n\n```go\nvar ErrApiValidateUpdateTransaction = func(c echo.Context) error {\n\treturn response.NewApiErrorResponse(c, \"error\", \"validation failed: invalid update transaction request\", http.StatusBadRequest)\n}\n```\nErrApiValidateUpdateTransaction returns an API error response when validation of the update transaction request fails.\n\n","path":"github.com/MamangRust/monolith-payment-gateway-shared/errors/transaction_errors/api","name":"transactionapierrors","synopsis":"","isRedistributable":true}
