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 ¶
IsMissing reports whether a failed job means the thing the endpoint addresses is not there as far as osapi is concerned, which the API answers with 404.
Three causes qualify, and they stay distinct behind this one question because they are not the same thing to an operator: the host has no such user, the file is there but osapi does not manage it, and the program the operation needs is not installed. An endpoint that ever needs to answer them differently asks errors.Is directly.
Types ¶
This section is empty.