mirror of
https://github.com/opensourcepos/opensourcepos.git
synced 2026-06-15 11:01:06 -04:00
ci: add debug logging for HTTP 500 errors
This commit is contained in:
7
.github/workflows/install-script-test.yml
vendored
7
.github/workflows/install-script-test.yml
vendored
@@ -70,6 +70,13 @@ jobs:
|
||||
echo "HTTP Response Code: $HTTP_CODE"
|
||||
if [ "$HTTP_CODE" = "200" ] || [ "$HTTP_CODE" = "302" ]; then
|
||||
echo "Apache is responding correctly"
|
||||
elif [ "$HTTP_CODE" = "500" ]; then
|
||||
echo "HTTP 500 - Application error. Checking logs..."
|
||||
sudo tail -50 /var/log/apache2/ospos_error.log 2>/dev/null || true
|
||||
sudo tail -50 /var/log/apache2/error.log 2>/dev/null || true
|
||||
echo "---"
|
||||
curl -s http://localhost/ | head -100
|
||||
exit 1
|
||||
else
|
||||
echo "Unexpected HTTP code: $HTTP_CODE"
|
||||
exit 1
|
||||
|
||||
Reference in New Issue
Block a user