Error flags

class bast3st.catchable.err[source]

Bases: Flag

Collection of all Catchable errors that can occur in any situation.

As described in enum.Flag, you can use bitwise operations to combine the error names from this type. Thisway, you can filter out arbitrary combinations of different error causes.

Never rely on the exact numeric values of the following constants. They are not stable and not considered part of the api.

(You can click on the [source] button to see how compound flags are defined.)

Warning

Compound error-values don’t exist at the json level and are serialized as a |-separated list of their parts, so if e. g. a new server version would introduce a new error kind, your previously (with an old version) serialized and uploaded specification won’t catch this error even though it might belong to a group whose compound flag you used. You then have to use a new version of this library to re-serialize the spec.

__new__(value)
any = 33554431
collection = 24576
collection_keyInvalidForArray = 8192

a MapKey that was used to index an array is either not in range or not an int

collection_valueNotFound = 16384

the key doesn’t belong to a value in the collection at hand

missing = 384
missing_list = 256

a list was requested and the whole list is missing. If the list was requested by name, there is no list with this name.

missing_variable = 128

a variable was requested that is missing, e.g. no variable with the specified name exists

network = 127
network_external = 32

networking can always fail, this error indicates that the program tried to execute the request but something failed that wasn’t in the program’s control

network_policy = 28
network_policy_other = 16

the administrator doesn’t allow the request for some reason

network_policy_schemeNotAllowed = 8

the administrator doesn’t allow using the specified scheme (=https, http, file, …)

network_policy_serverNotAllowed = 4

the administrator doesn’t allow contacting the specified server

network_respInvalid_notJson = 2

a selector tried to extract json from the response, but the response is not json

network_statusDisallowed = 1

the status that was reported isn’t among the ones in the allow-list

network_url_syntax = 64

the combination of server + ‘/’ + route can’t be parsed as a valid url

regex = 7680
regex_invalidHaystack = 2048

the thing in which the pattern should search is neither an array nor a text

regex_noGroup = 4096

the specified capture group doesn’t exist

regex_noMatch = 1024

there is no match for the pattern in the specified text/array

regex_syntax = 512

the syntax of the pattern is invalid

typing = 33521664

typing errors occur if a component needs an evaluated value to be of a specific shape while it isn’t the case

typing_notAction = 131072
typing_notCollection = 98304
typing_notCollection_notArray = 32768
typing_notCollection_notMapping = 65536
typing_notCriterion = 262144
typing_notIterable = 16777216
typing_notMapkey = 8388608
typing_notNumeric = 4194304
typing_notPrimitive = 1048576
typing_notText = 2097152
typing_notValue = 524288