google-cloud-python icon indicating copy to clipboard operation
google-cloud-python copied to clipboard

Improve gRPC error message when request is invalid

Open ithomaslin opened this issue 1 year ago • 7 comments

Hi folks,

from google.cloud.run_v2 import ListJobsRequest
from google.oauth2 import service_account
import google.cloud.run_v2 as run_v2

credentials = service_account.Credentials.from_service_account_file("key.json")

run_client = run_v2.ServicesClient(credentials=credentials)

request = ListJobsRequest(
    parent="parent_name"
)

run_client.list_jobs(request=request)

With the above code, which is following the sample provided in the official documentation. However, I got this error message:

grpc._channel._InactiveRpcError: <_InactiveRpcError of RPC that terminated with:
	status = StatusCode.UNIMPLEMENTED
	details = "Operation is not implemented, or supported, or enabled."
	debug_error_string = "UNKNOWN:Error received from peer ipv6:%5B2404:6800:4012::200a%5D:443 {created_time:"2024-05-31T19:40:11.155916+08:00", grpc_status:12, grpc_message:"Operation is not implemented, or supported, or enabled."}"
>

ithomaslin avatar May 31 '24 11:05 ithomaslin