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

feat(gateway): special error if own project is already running #1192

Merged
merged 2 commits into from
Sep 1, 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
improve error message
  • Loading branch information
thass0 committed Sep 1, 2023
commit 92d40dfaf691e975bbafc147c4d788474940c32e
7 changes: 4 additions & 3 deletions common/src/models/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -98,9 +98,10 @@ impl From<ErrorKind> for ApiError {
StatusCode::BAD_REQUEST,
"a project with the same name already exists",
),
ErrorKind::ProjectAlreadyRunning => {
(StatusCode::BAD_REQUEST, "project is already running")
}
ErrorKind::ProjectAlreadyRunning => (
StatusCode::BAD_REQUEST,
"it looks like your project is already running. You can find out more with `cargo shuttle project status`",
),
ErrorKind::InvalidCustomDomain => (StatusCode::BAD_REQUEST, "invalid custom domain"),
ErrorKind::CustomDomainNotFound => (StatusCode::NOT_FOUND, "custom domain not found"),
ErrorKind::CustomDomainAlreadyExists => {
Expand Down