Skip to content

Commit

Permalink
add error print on 500 challenge deploy
Browse files Browse the repository at this point in the history
Also disables mypy since it's not working properly
  • Loading branch information
burturt committed Feb 5, 2025
1 parent 5a5e1e6 commit aefaffa
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 17 deletions.
32 changes: 16 additions & 16 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,22 +10,22 @@ repos:
- id: check-yaml
- id: end-of-file-fixer
- id: trailing-whitespace
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.3.0
hooks:
- id: mypy
files: "^backend/"
args: ["--config-file", "backend/pyproject.toml"]
additional_dependencies:
- "Flask ~= 2.2.3"
- "gunicorn ~= 20.1.0"
- "types-redis ~= 4.5.1"
- "types-PyYAML ~= 6.0"
- "types-jsonschema ~= 4.17"
- "psycopg[pool] ~= 3.1.9"
- "pycryptodome ~= 3.18.0"
- "python-dotenv ~= 1.0.0"
- "types-requests ~= 2.31.0"
# - repo: https://github.com/pre-commit/mirrors-mypy
# rev: v1.3.0
# hooks:
# - id: mypy
# files: "^backend/"
# args: ["--config-file", "backend/pyproject.toml"]
# additional_dependencies:
# - "Flask ~= 2.2.3"
# - "gunicorn ~= 20.1.0"
# - "types-redis ~= 4.5.1"
# - "types-PyYAML ~= 6.0"
# - "types-jsonschema ~= 4.17"
# - "psycopg[pool] ~= 3.1.9"
# - "pycryptodome ~= 3.18.0"
# - "python-dotenv ~= 1.0.0"
# - "types-requests ~= 2.31.0"
- repo: https://github.com/pycqa/isort
rev: 5.12.0
hooks:
Expand Down
3 changes: 2 additions & 1 deletion backend/instancer/api/challenge.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,8 @@ def challenge_deploy() -> ResponseReturnValue:
"status": "temporarily_unavailable",
"msg": "This challenge is temporarily unavailable. Try again in a few moments.",
}, 503
except Exception:
except Exception as e:
print("ERROR when deploying challenge:", e, flush=True)
return {
"status": "unknown_error",
"msg": "An unexpected error occurred.",
Expand Down

0 comments on commit aefaffa

Please sign in to comment.