Skip to content

Commit 6129482

Browse files
authored
feat: add self to validate_handler_fn error message (#4157)
1 parent dfeb588 commit 6129482

File tree

1 file changed

+1
-1
lines changed
  • litestar/handlers/http_handlers

1 file changed

+1
-1
lines changed

litestar/handlers/http_handlers/base.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -610,7 +610,7 @@ def _validate_handler_function(self) -> None:
610610
) and not is_empty_response_annotation(return_type):
611611
raise ImproperlyConfiguredException(
612612
"A status code 204, 304 or in the range below 200 does not support a response body. "
613-
"If the function should return a value, change the route handler status code to an appropriate value.",
613+
f"If {self} should return a value, change the route handler status code to an appropriate value.",
614614
)
615615

616616
if not self.media_type:

0 commit comments

Comments
 (0)