chore: stop logging SupersetExceptions if status < 500 (#14088)

* setup exception

* figured out

* Update base.py
This commit is contained in:
Hugh A. Miles II 2021-04-13 12:52:14 -04:00 committed by GitHub
parent f453287a07
commit 3a011ecc06
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -198,7 +198,8 @@ def handle_api_exception(
logger.warning(ex)
return json_errors_response(errors=[ex.error], status=ex.status)
except SupersetException as ex:
logger.exception(ex)
if ex.status >= 500:
logger.exception(ex)
return json_error_response(
utils.error_msg_from_exception(ex), status=ex.status
)