Currently, there are three api errors that can be translated:
fanvid-create-error
fanvid-user-or-api-key-required
fanvid-not-found
However, these translations would probably never be seen by the end user, and most API errors (i.e. validation errors from pydantic or errors from fastapi-users) are not translatable server-side (because they're generated by third-party code and there isn't a mechanism to inject translation logic into it). Instead, we translate them client-side based on the error identifier provided.
We should standardize on this behavior; our API errors should match either fastapi-users or pydantic structures, and be handled similarly in terms of translation (where applicable - i.e. 404 errors are already handled differently just based on status code.)
Currently, there are three api errors that can be translated:
However, these translations would probably never be seen by the end user, and most API errors (i.e. validation errors from pydantic or errors from fastapi-users) are not translatable server-side (because they're generated by third-party code and there isn't a mechanism to inject translation logic into it). Instead, we translate them client-side based on the error identifier provided.
We should standardize on this behavior; our API errors should match either fastapi-users or pydantic structures, and be handled similarly in terms of translation (where applicable - i.e. 404 errors are already handled differently just based on status code.)