fallback

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Nov 7, 2026 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

Package fallback - logging an error that the code handles itself by falling back to something (a default value, an empty list) instead of returning it. It sits below the domain packages (service, views, themes) so that they all log fallbacks the same way. service.LogFallback and modulekit.LogFallback call it.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Log

func Log(logger *slog.Logger, err error, msg string, args ...any)

Log logs an error that a service (the core's or a module's) handles itself by falling back to a default value or an empty list: a missing record (entity.ErrEntityNotFound or apperrors.ErrNotFound, wrapped or not) at debug level, anything else as a warning. A nil error logs nothing. Don't log here an error the service returns: wrap it with what the service was doing, and the handler logs it once.

Types

This section is empty.

Jump to

Keyboard shortcuts

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