Skip to content

APIError.Error() nil pointer exception in some cases. #350

@hime

Description

@hime

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

  1. Create API Error using ParseError
  2. 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.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions