ghazi-git / drf-standardized-errors

Standardize your DRF API error responses
https://drf-standardized-errors.readthedocs.io/en/latest/
MIT License
251 stars 15 forks source link

ExceptionFormatter ignores ErrorDetail with an empty detail message #82

Closed kietheros closed 1 month ago

kietheros commented 1 month ago

https://github.com/ghazi-git/drf-standardized-errors/blob/e4f20b656609059553b0dacde13d7d9f0099f24a/drf_standardized_errors/formatter.py#L112

If my code raises APIException(""), it will be ignored.

try:
    func()  # could raise an Exception with empty message
except Exception as ex:
    raise APIException(str(ex))
ghazi-git commented 1 month ago

Thank you for raising the issue and identifying the root cause @kietheros. The fix will be part of the next release.