Error handling breaks when using rest fallback #3531
Labels
api: monitoring
Issues related to the Cloud Monitoring API.
priority: p2
Moderately-important priority. Fix may not be included in next release.
type: bug
Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
We're currently creating our
MetricServiceClient
using the rest fallback method, since we're building our code with esbuild and using protos does not seem to be supported. However, if thecreateTimeSeries
call fails, the the error is not handled and emitted by the library. Instead, it causes a crash and an unhelpful error message is emitted.Stacktrace:
This is roughly how we're using the library:
Environment details
@google-cloud/monitoring
version: 3.0.2Steps to reproduce
new MetricServiceClient({ fallback: "rest" })
createTimeSeries
to error (in our case, I believe we were exceeding the rate limit).Error: googleProtobufAnyFromProto3JSON: cannot find type google.monitoring.v3.CreateTimeSeriesSummary: Error: no such type: google.monitoring.v3.CreateTimeSeriesSummary
.The text was updated successfully, but these errors were encountered: