apierrors

package
v1.8.0 Latest Latest
Warning

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

Go to latest
Published: Apr 15, 2020 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrDatasetNotFound        = errors.New("dataset not found")
	ErrDeleteIndexNotFound    = errors.New("search index not found")
	ErrEditionNotFound        = errors.New("edition not found")
	ErrEmptySearchTerm        = errors.New("empty search term")
	ErrIndexNotFound          = errors.New("search index not found")
	ErrInternalServer         = errors.New("internal server error")
	ErrMarshallingQuery       = errors.New("failed to marshal query to bytes for request body to send to elastic")
	ErrParsingQueryParameters = errors.New("failed to parse query parameters, values must be an integer")
	ErrUnauthenticatedRequest = errors.New("unauthenticated request")
	ErrUnmarshallingJSON      = errors.New("failed to parse json body")
	ErrUnexpectedStatusCode   = errors.New("unexpected status code from elastic api")
	ErrVersionNotFound        = errors.New("version not found")

	NotFoundMap = map[error]bool{
		ErrDatasetNotFound:     true,
		ErrDeleteIndexNotFound: true,
		ErrEditionNotFound:     true,
		ErrVersionNotFound:     true,
	}

	BadRequestMap = map[error]bool{
		ErrEmptySearchTerm:        true,
		ErrParsingQueryParameters: true,
	}
)

A list of error messages for Search API

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