errs

package
v0.0.0-...-f347ef5 Latest Latest
Warning

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

Go to latest
Published: Sep 24, 2022 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// GenericErrorMessage is generic error message returned to user.
	GenericErrorMessage = New("Unexpected error. Please try again later.")

	// ErrSignatureInvalid is returned when the webhook
	// signature is invalid or cannot be calculated.
	ErrSignatureInvalid = New("Invalid webhook signature")

	// ErrUnknownEvent is returned when the webhook event
	// is not recognized by the system.
	ErrUnknownEvent = New("Unknown webhook event")

	// ErrQuery is returned when database query fails
	ErrQuery = New("SQL query failed")

	// ErrEmptyCommit is returned when there is empty commit event
	ErrEmptyCommit = New("Empty commit")

	// ErrPingEvent is returned when database query fails
	ErrPingEvent = New("webhook ping event")

	// ErrNotSupported is returned when database query fails
	ErrNotSupported = New("Event not supported")

	// ErrInvalidSCMProvider is returned when invalid scm driver is provided
	ErrInvalidSCMProvider = New("Invalid git scm provider")

	// ErrMarshalJSON is returned when json marshal failed
	ErrMarshalJSON = New("JSON marshal failed")

	// ErrRepoNotFound is returned when given repo is not active in database.
	ErrRepoNotFound = New("Repository not active.")

	// ErrRowsNotFound is returned by Scan when QueryRow doesn't return a
	// row.
	ErrRowsNotFound = sql.ErrNoRows
)
View Source
var ErrInvalidDriver = New("Invalid Git SCM driver")

ErrInvalidDriver is returned when SCM driver is not defined

View Source
var ErrInvalidLoggerInstance = New("Invalid logger instance")

ErrInvalidLoggerInstance is returned when logger instance is not supported.

Functions

func New

func New(text string) error

New returns a new error message.

Types

type Error

type Error struct {
	Message string `json:"message"`
}

Error represents a json-encoded API error.

func (*Error) Error

func (e *Error) Error() string

Jump to

Keyboard shortcuts

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