APIError
is suggested to be returned from stream.Recv()
#302
Labels
enhancement
New feature or request
APIError
is suggested to be returned from stream.Recv()
#302
In the example below, it is very helpful to get
err type
other than err message at some cases. For example, when your quota exceeded, the raw response isThis error will be returned by
stream.Recv()
and the error message is generated aserror, You exceeded your current quota, please check your plan and billing details."
. Error message is changeable due to many reasons, thus it is imprecise to determine that the account has no quota through it. Instead,error type
is needed here since it is supposed to be hard to change.So, an error object to return is needed here, a.k.a,
APIError
is suggested to be returned fromstream.Recv()
The text was updated successfully, but these errors were encountered: