apperrors

package
v0.53.0 Latest Latest
Warning

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

Go to latest
Published: Apr 17, 2024 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrContentTypeNotFound          = errors.New("content type not found")
	ErrInternalServer               = errors.New("internal server error")
	ErrInvalidPage                  = errors.New("invalid page value, exceeding the default maximum search results")
	ErrInvalidQueryString           = errors.New("the query string did not meet requirements")
	ErrInvalidQueryCharLengthString = errors.New("the query string is less than the required character length")
	ErrPageExceedsTotalPages        = errors.New("invalid page value, exceeding the total page value")
	ErrTopicNotFound                = errors.New("topic not found")
	ErrTopicPathNotFound            = errors.New("topic path not found")

	BadRequestMap = map[error]bool{
		ErrContentTypeNotFound:   true,
		ErrInvalidPage:           true,
		ErrInvalidQueryString:    true,
		ErrPageExceedsTotalPages: true,
		ErrTopicNotFound:         true,
	}

	NotFoundMap = map[error]bool{
		ErrTopicPathNotFound: true,
	}

	// ErrMapForRenderBeforeAPICalls is a list of errors which leads to the search page being rendered before making any API calls
	ErrMapForRenderBeforeAPICalls = map[error]bool{
		ErrInvalidQueryString:           true,
		ErrInvalidQueryCharLengthString: true,
	}
)

Functions

This section is empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

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