Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
17 commits
Select commit Hold shift + click to select a range
b5dbc6a
feat: add .dockerignore to reduce build context size
codcreater1 Jul 2, 2026
c0fd62b
Merge branch 'main' of https://github.com/codcreater1/agentic-interns…
codcreater1 Jul 2, 2026
58cc3fb
Merge branch 'main' of https://github.com/codcreater1/agentic-interns…
codcreater1 Jul 2, 2026
a7a0d8c
Merge branch 'main' of https://github.com/codcreater1/agentic-interns…
codcreater1 Jul 2, 2026
5662ffd
Merge branch 'main' of https://github.com/codcreater1/agentic-interns…
codcreater1 Jul 2, 2026
fc424cf
Merge branch 'main' of https://github.com/codcreater1/agentic-interns…
codcreater1 Jul 2, 2026
4feb80f
Merge branch 'main' of https://github.com/codcreater1/agentic-interns…
codcreater1 Jul 2, 2026
01225e0
Merge branch 'main' of https://github.com/codcreater1/agentic-interns…
codcreater1 Jul 2, 2026
cdb378b
Merge branch 'main' of https://github.com/codcreater1/agentic-interns…
codcreater1 Jul 2, 2026
b779c47
Merge branch 'main' of https://github.com/codcreater1/agentic-interns…
codcreater1 Jul 2, 2026
1165274
Merge branch 'main' of https://github.com/codcreater1/agentic-interns…
codcreater1 Jul 7, 2026
0d3b748
Merge branch 'main' of https://github.com/codcreater1/agentic-interns…
codcreater1 Jul 14, 2026
1445cee
Merge branch 'main' of https://github.com/codcreater1/agentic-interns…
codcreater1 Jul 14, 2026
b66b82a
Merge branch 'main' of https://github.com/codcreater1/agentic-interns…
codcreater1 Jul 16, 2026
7cdb654
Merge branch 'main' of https://github.com/codcreater1/agentic-interns…
codcreater1 Jul 16, 2026
1127d6d
Merge branch 'main' of https://github.com/codcreater1/agentic-interns…
codcreater1 Jul 16, 2026
0634330
fix: surface the real reason a contract email fails
codcreater1 Jul 16, 2026
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
6 changes: 4 additions & 2 deletions backend/app/routers/applications.py
Original file line number Diff line number Diff line change
Expand Up @@ -190,9 +190,11 @@ def send_contract(index: int, request: SendContractRequest):
candidate_name=application.name,
)
except email_service.EmailNotConfiguredError as exc:
raise HTTPException(status_code=503, detail=str(exc)) from exc
raise HTTPException(status_code=409, detail=str(exc)) from exc
except email_service.EmailSendError as exc:
raise HTTPException(status_code=502, detail=str(exc)) from exc
# 424 (not 502): a CDN in front of the API rewrites upstream 5xx into its
# own error page, which would hide the reason from the coordinator.
raise HTTPException(status_code=424, detail=str(exc)) from exc

application.contract_sent_to = request.to
application.contract_sent_at = datetime.now(timezone.utc).isoformat()
Expand Down
12 changes: 9 additions & 3 deletions backend/app/services/email_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,10 +73,16 @@ def send_signed_contract(
)
response.raise_for_status()
except httpx.HTTPStatusError as exc:
raise EmailSendError(
message = (
f"n8n webhook returned {exc.response.status_code}: {exc.response.text[:200]}"
) from exc
)
logger.error("Contract email failed — %s", message)
raise EmailSendError(message) from exc
except httpx.HTTPError as exc:
raise EmailSendError(f"Could not reach the n8n webhook: {exc}") from exc
# Log the exception type too: a bare message like "" is common for
# connect/DNS errors and tells the operator nothing on its own.
message = f"Could not reach the n8n webhook ({type(exc).__name__}): {exc}"
logger.error("Contract email failed — %s", message)
raise EmailSendError(message) from exc

logger.info("Signed contract emailed via n8n to %s", to)
Loading