-
-
Notifications
You must be signed in to change notification settings - Fork 785
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 returned from graphql #3562
Conversation
Added logging for when the user logs in or out, when invalid credentials are entered, and when credentials are changed. |
@@ -34,7 +34,15 @@ const ( | |||
passwordFormKey = "password" | |||
) | |||
|
|||
var ErrInvalidCredentials = errors.New("invalid username or password") | |||
type InvalidCredentialsError struct { | |||
Username string |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this actually used anywhere? I only see it set when initializing ?
Wouldnt an empty struct be enough?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I originally had this field included in the Error
method, but I've taken it out for now (until we support multiple users). Having the field means that we can read the username from the calling code, so it's useful, just not currently in use.
Adds an error presenter to the graphql interface that logs any encountered errors to the error log level. Also logs the request arguments at the debug log level when an error is encountered.