responses¶
ErrorResponse (Response)
pydantic-model
¶
errors MUST be present and data MUST be skipped
data_must_be_skipped(values)
classmethod
¶
Source code in optimade/models/responses.py
@root_validator(pre=True)
def data_must_be_skipped(cls, values):
if values.get("data", None) is not None:
raise ValueError("data MUST be skipped for failures reporting errors")
return values