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

Improve error messages #639

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
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
4 changes: 2 additions & 2 deletions pkg/server/app/errors.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ var (
ErrInvalidName = status.Errorf(codes.InvalidArgument, "Invalid App Name")
ErrInvalidLimits = status.Errorf(codes.InvalidArgument, "Invalid Limits")
ErrInvalidAutoscale = status.Errorf(codes.InvalidArgument, "Invalid Autoscale")
ErrInvalidEnvVarName = status.Errorf(codes.InvalidArgument, "Invalid Env Var Name")
ErrInvalidSecretName = status.Errorf(codes.InvalidArgument, "Invalid Secret Name")
ErrInvalidEnvVarName = status.Errorf(codes.InvalidArgument, "Invalid Env Var Name (Could be a secret already set)")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe use Invalid Env Var Name, or Env Var already set instead, since it gives the impression that you can use a secret or env var that is already set (that's just 💅 though).

Also, I think you should swap the message here with the message below

Suggested change
ErrInvalidEnvVarName = status.Errorf(codes.InvalidArgument, "Invalid Env Var Name (Could be a secret already set)")
ErrInvalidEnvVarName = status.Errorf(codes.InvalidArgument, "Invalid Env Var Name (Could be a env var already set)")

ErrInvalidSecretName = status.Errorf(codes.InvalidArgument, "Invalid Secret Name (Could be a env var already set)")
ErrInvalidActionForCronJob = status.Errorf(codes.InvalidArgument, "Invalid action for a cronjob app")
ErrMissingVirtualHost = status.Errorf(
codes.InvalidArgument,
Expand Down