OWASP API8 2023 Define Error Responses 500 (Edit)
OWASP API Security recommends defining schemas for all responses, even errors. The 500 describes what happens when a request fails with an internal server error, so it is important to define this for documentation and contract testing.
OWASPSecurityResponsesErrorsOpenAPI