litestar icon indicating copy to clipboard operation
litestar copied to clipboard

docs: refactor exception usage

Open sobolevn opened this issue 4 months ago • 2 comments

I made quite a lot of changes:

  1. I replaced :doc: with :ref: since it is more reliable
  2. I replaced things like
:class:`HTTPException <.exceptions.http_exceptions.HTTPException>`

to be just

:class:`~litestar.exceptions.http_exceptions.HTTPException`

Because it the same thing

  1. I changed a lot of wordings to be more readable (for my taste, please, suggest better ones)
  2. I changed .. :currentmodule:: litestar.exceptions.http_exceptions in two ways: removed py, because it is the default role, and reset it after the table. It can be very hard to find why something does not work in the future, when you manipulate current module without reseting it properly
  3. I moved exception in the table to be ordered by error code, it used to be: Снимок экрана 2024-10-17 в 10 29 41
  4. I moved the paragraph about handling exceptions in different layers of the app after we introduce the layers concept :)

sobolevn avatar Oct 17 '24 07:10 sobolevn