apierr

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Nov 27, 2026 License: MIT Imports: 2 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package apierr answers, in one place, which HTTP status a failed job deserves.

It exists so that thirty-odd handlers do not each decide for themselves. They used to, by matching on the words a provider happened to use, and the answers drifted: one endpoint checked for "does not exist" while its neighbour checked "not found", a third checked neither and answered 500 where its own specification promised 404, and two checked for a phrase the code they call can never produce.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsMissing

func IsMissing(
	err error,
) bool

IsMissing reports whether a failed job means the thing the endpoint addresses is not there as far as osapi is concerned: the host has no such item, the item is there but osapi does not manage it, or the program the operation needs is not installed. Reason tells them apart in the answer, so a program does not read the message.

Types

This section is empty.

Jump to

Keyboard shortcuts

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