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

The error returned from the mock GRPC call is not interpreted as an error #3076

Open
maqiuyujoyce opened this issue Nov 2, 2024 · 1 comment
Labels
contributor:faq For questions and troubleshooting related to the resource contributions.

Comments

@maqiuyujoyce
Copy link
Collaborator

Describe your question

In the mock test, the error returned from the mock GRPC call is not interpreted as an error (- was want and + was got):

        -       "error": {
        -         "code": 404,
        -         "message": "Resource 'projects/${projectId}/locations/global/entitlements/privilegedaccessmanagerentitlement-${uniqueId}' was not found",
        -         "status": "NOT_FOUND"
        -       }
        +       "code": 5,
        +       "details": [],
        +       "message": "Resource 'projects/${projectId}/locations/global/entitlements/privilegedaccessmanagerentitlement-${uniqueId}' was not found"
              }
@maqiuyujoyce maqiuyujoyce added the contributor:faq For questions and troubleshooting related to the resource contributions. label Nov 2, 2024
@maqiuyujoyce
Copy link
Collaborator Author

Root cause:

The mock service handler was registered with the real ServeMux instead of the mockgcp ServeMux. Example fix can be found here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
contributor:faq For questions and troubleshooting related to the resource contributions.
Projects
None yet
Development

No branches or pull requests

1 participant