-
Notifications
You must be signed in to change notification settings - Fork 39
Closed
Labels
priority: p2Moderately-important priority. Fix may not be included in next release.Moderately-important priority. Fix may not be included in next release.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
Description
I'm curious if getting a nil pointer exception when trying to get string version of APIError (using .Error()) documented. The issue arises when we attempt to run operations on the wrapped error field APIError.err
. We are able to safely created using the ParseError
. However, when we call .Error() method on this error, we call APIError.err.Error()
without checking if err field was set.
Environment details
- Package version: gax-go/v2 v2.12.3
Steps to reproduce
- Create API Error using ParseError
- Call (APIError).Error() on error.
Making sure to follow these steps will guarantee the quickest resolution possible.
Thanks!
Metadata
Metadata
Assignees
Labels
priority: p2Moderately-important priority. Fix may not be included in next release.Moderately-important priority. Fix may not be included in next release.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.Error or flaw in code with unintended results or allowing sub-optimal usage patterns.