Exceptions
InjectableNotResolved
Bases: RuntimeError
, LagomException
An instance of injectable was consumed in some user code. This should not occur as lagom should have replaced the injectable with an object. This likely means the function wasn't bound to an injection container.
Source code in lagom/exceptions.py
16 17 18 19 20 21 22 23 24 |
|
InvalidDependencyDefinition
Bases: ValueError
, LagomException
The provided construction logic is not valid
Source code in lagom/exceptions.py
27 28 29 30 |
|
ClassesCannotBeDecorated
Bases: SyntaxError
, LagomException
Decorating classes is not supported by lagom
Source code in lagom/exceptions.py
33 34 35 36 37 38 39 40 41 42 43 |
|
MissingReturnType
Bases: SyntaxError
, LagomException
The function provided doesnt type hint a return
Source code in lagom/exceptions.py
46 47 48 49 |
|
DuplicateDefinition
Bases: ValueError
, LagomException
The type has already been defined somewhere else
Source code in lagom/exceptions.py
52 53 54 55 |
|
UnableToInvokeBoundFunction
Bases: TypeError
, LagomException
A function bound to the container could not be invoked
Source code in lagom/exceptions.py
76 77 78 79 80 81 82 83 84 85 86 |
|
UnresolvableType
Bases: ValueError
, LagomException
The type cannot be constructed
Source code in lagom/exceptions.py
89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 |
|
TypeResolutionBlocked
Bases: UnresolvableType
The type was explicitly blocked by configuration
Source code in lagom/exceptions.py
112 113 114 115 116 |
|
RecursiveDefinitionError
Bases: SyntaxError
, LagomException
Whilst trying to resolve the type python exceeded the recursion depth
Source code in lagom/exceptions.py
119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 |
|
DependencyNotDefined
Bases: ValueError
, LagomException
The type must be explicitly defined in the container
Source code in lagom/exceptions.py
136 137 138 139 140 141 142 143 144 145 146 147 148 149 |
|
MissingEnvVariable
Bases: LagomException
Whilst trying to load settings from environment variables one or more required variables had not been set. More documentation for this can be found in the lagom.environment module.
Source code in lagom/exceptions.py
152 153 154 155 156 157 158 159 160 161 |
|
InvalidEnvironmentVariables
Bases: LagomException
Whilst trying to load settings from environment variables one or more variables failed the validation rules. Internally the pydantic library is used to coerce and validate the environment variable from a string into a python data type. More documentation for this can be found in the lagom.environment module.
Source code in lagom/exceptions.py
164 165 166 167 168 169 170 171 172 173 174 175 |
|