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 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 |
|
TypeResolutionBlocked
Bases: UnresolvableType
The type was explicitly blocked by configuration
Source code in lagom/exceptions.py
129 130 131 132 133 134 135 136 |
|
RecursiveDefinitionError
Bases: SyntaxError
, LagomException
Whilst trying to resolve the type python exceeded the recursion depth
Source code in lagom/exceptions.py
139 140 141 142 143 144 145 146 147 148 149 150 151 152 |
|
DependencyNotDefined
Bases: ValueError
, LagomException
The type must be explicitly defined in the container
Source code in lagom/exceptions.py
155 156 157 158 159 160 161 162 163 164 165 166 167 168 |
|
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
171 172 173 174 175 176 177 178 179 180 |
|
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
183 184 185 186 187 188 189 190 191 192 193 194 |
|