err

package
v0.0.0-...-5aefab3 Latest Latest
Warning

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

Go to latest
Published: Apr 24, 2026 License: MIT Imports: 0 Imported by: 0

Documentation

Overview

Package err defines public error types that are returned to clients

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Error

type Error struct {
	// Message defines the error message
	// It is a map from language tags to messages
	// If a language is not translated, the whole language tag key is missing
	// E.g. compare (english and french translations)
	// {"en": "hello", "fr": "bonjour"}
	// and
	// {"en": "hello"}
	// English is always present and should be used as a fallback
	Message Translated `json:"message"`

	// Misc indicates whether or not this error is only there for miscellaneous purposes
	// If this is set to True, the client UI SHOULD NOT show this error
	Misc bool `json:"misc"`
}

Error is the struct that defines the public error types This contains the error message with translations And other info

type Translated

type Translated map[string]string

Translated defines the type for translated strings It is a map from language tags to error messages

Jump to

Keyboard shortcuts

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