Skip to content

method.resource_missing

A file the method refers to is not in its tree

Type https://mthds.ai/errors/method.resource_missing
Family method: The method as written, the validation vocabulary included.
Domain method: the method's author acts, by changing the method
Retry no: repeating the operation fails the same way
HTTP status 422
Raised as a problem document, sent as the body of an HTTP response or kept in a run's record

What it means

A file reference names no file of the method's tree, climbs above its root, or is written as an absolute path, with a backslash or with a scheme. Resolving a reference is a lookup in the tree's set of paths and never opens a file, so this is a fault of the method rather than a security matter.

What to do

Check that the file is in the tree the request sends, and write its reference relative to the referring file, with forward slashes.

Next steps

A problem carries the step aimed at whoever reads it: the first when its reader is the domain's actor, the method's author, and the second for any other reader.

Reader Kind Detail
The domain's actor change_method Point the reference '{file}' at a file of the method's tree, written as a relative path with forward slashes, then send the method again.
Any other reader contact_owner Ask the method's owner to point the reference '{file}' at a file of the method's tree.

Detail

The problem's detail is written from this template, filled with the occurrence's parameters:

The file reference '{file}' resolves to no file of the method's tree (reason: {reason}).

Parameters

Every parameter is present on every occurrence of the code.

Name Type Description
file identifier The file reference at fault.
reason one of not_in_tree, leaves_tree, absolute, backslash, scheme Why the reference resolves to no file of the tree: it names none, it climbs above the root, or it is written as an absolute path, with a backslash or with a scheme.

See also