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

standardize errors and logs of server pkg #218

Merged
merged 4 commits into from
Jul 21, 2017

Conversation

drgarcia1986
Copy link
Contributor

@drgarcia1986 drgarcia1986 commented Jul 20, 2017

This change is Reviewable

if ops.kops.IsAlreadyExists(err) {
return ErrAlreadyExists
}
return teresa_errors.New(teresa_errors.ErrInternalServerError, err)
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe I would go with teresa_errors.NewInternalServerError(err)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Agree. This little change will simplify a lot.

@@ -201,9 +212,9 @@ func (ops *AppOperations) TeamName(appName string) (string, error) {
teamName, err := ops.kops.NamespaceLabel(appName, TeresaTeamLabel)
if err != nil {
if ops.kops.IsNotFound(err) {
return "", newAppErr(ErrNotFound, err)
return "", teresa_errors.New(ErrNotFound, err)
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe just return "", ErrNotFound

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah, your right!

@drgarcia1986 drgarcia1986 mentioned this pull request Jul 20, 2017
26 tasks
Copy link
Contributor

@aguerra aguerra left a comment

Choose a reason for hiding this comment

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

🔁

@drgarcia1986 drgarcia1986 merged commit 3888750 into master Jul 21, 2017
@drgarcia1986 drgarcia1986 deleted the dg-logs_errors_cleanup branch July 21, 2017 17:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants