Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 8 additions & 7 deletions api/views/health.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,11 @@ def get_db_status():
with connection.cursor() as cursor:
cursor.execute("SELECT 1")
cursor.fetchone()
return "up"
except Exception as e:
logger.exception(f"Database connectivity check failed: {e}")
except Exception:
logger.exception("Database connectivity check failed")
return "down"
else:
return "up"


def get_es_status():
Expand All @@ -49,8 +50,8 @@ def get_es_status():
"yellow": "up",
"red": "down",
}.get(health.get("status"), "unknown")
except Exception as e:
logger.exception(f"Elasticsearch health check failed: {e}")
except Exception:
logger.exception("Elasticsearch health check failed")
return "down"


Expand Down Expand Up @@ -151,8 +152,8 @@ def get_status_overview():
"jobs": job_data,
}

except Exception as e:
logger.exception(f"Status aggregation failed : {e}")
except Exception:
logger.exception("Status aggregation failed")
db_status = "degraded"

return {
Expand Down
13 changes: 4 additions & 9 deletions api/views/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -645,18 +645,13 @@ def get_greedybear_news() -> list[dict]:
"subtext": subtext,
}
)

except Exception:
logger.exception("Failed to fetch GreedyBear news from RSS feed")
return []
else:
cache.set(
CACHE_KEY_GREEDYBEAR_NEWS,
news_items,
CACHE_TIMEOUT_SECONDS,
)

return news_items

except Exception as exc:
logger.error(
"Failed to fetch GreedyBear news from RSS feed",
exc_info=exc,
)
return []
6 changes: 3 additions & 3 deletions authentication/serializers.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ def validate_key(self, key):
exc.detail = "The provided verification key is invalid or your email address is already verified."
if "expired" in err_str:
exc.detail = "The provided verification key has expired or your email address is already verified."
raise exc
raise

def save(self):
"""
Expand Down Expand Up @@ -135,8 +135,8 @@ def save(self):
),
channel=certego_apps_settings.DEFAULT_SLACK_CHANNEL,
)
except SlackApiError as exc:
slack.log.error(f"Slack message failed for user(#{user.pk}) with error: {exc}")
except SlackApiError:
slack.log.exception(f"Slack message failed for user(#{user.pk})")


class LoginSerializer(AuthTokenSerializer):
Expand Down
2 changes: 1 addition & 1 deletion docker/Dockerfile_nginx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM library/nginx:1.29.8-alpine
FROM library/nginx:1.31.0-alpine

ENV NGINX_LOG_DIR=/var/log/nginx

Expand Down
Loading
Loading