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

log errors in api handler #179

Merged
merged 2 commits into from
May 29, 2018
Merged

log errors in api handler #179

merged 2 commits into from
May 29, 2018

Conversation

Lagovas
Copy link
Collaborator

@Lagovas Lagovas commented May 25, 2018

No description provided.

@Lagovas Lagovas requested a review from vixentael May 25, 2018 14:15
@@ -85,9 +87,13 @@ func (clientSession *ClientCommandsSession) HandleSession() {
case "/getNewZone":
log.Debugln("Got /getNewZone request")
id, publicKey, err := clientSession.keystorage.GenerateZoneKey()
if err == nil {
if err != nil {
log.WithError(err).Errorln("can't generate zone key")
Copy link
Collaborator

Choose a reason for hiding this comment

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

I would start logs from capital letter.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Can we create separate error code here? Or you think it's not useful?

@vixentael vixentael merged commit 5cf40e8 into cossacklabs:master May 29, 2018
@Lagovas Lagovas deleted the lagovas/log-api-error branch June 20, 2018 11:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants