♻️(backend) standardize error response format in token endpoint

Align error response with the pattern used at other places of the codebase.
This commit is contained in:
lebaudantoine
2025-12-17 19:19:11 +01:00
committed by aleb_the_flash
parent fe83c5fa07
commit 4e6bc157b0

View File

@@ -114,11 +114,7 @@ class ApplicationViewSet(viewsets.GenericViewSet):
application.client_id,
)
else:
raise drf_exceptions.NotFound(
{
"error": "User not found.",
}
) from e
raise drf_exceptions.NotFound("User not found.") from e
now = datetime.now(timezone.utc)
scope = " ".join(application.scopes or [])