Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Run ECS launch in goroutine, and add local cluster paymodel #61

Merged
merged 22 commits into from
Apr 13, 2023
Merged
Changes from 1 commit
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
Prev Previous commit
Next Next commit
Add 500 error on launch instead of 403
  • Loading branch information
jawadqur committed Apr 4, 2023
commit 8ec594088a08055336a408141004cab2050009d9
4 changes: 3 additions & 1 deletion hatchery/hatchery.go
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,9 @@ func launch(w http.ResponseWriter, r *http.Request) {
} else if payModel.Ecs {

if payModel.Status != "active" {
http.Error(w, "Paymodel is not active. Launch forbidden", http.StatusForbidden)
// send 500 response.
// TODO: 403 is the correct code, but it triggers a 302 to the default 403 page in revproxy instead of showing error message.
http.Error(w, "Paymodel is not active. Launch forbidden", http.StatusInternalServerError)
return
}

Expand Down