@@ -163,19 +163,21 @@ type fcmErrorResponse struct {
163163 } `json:"error"`
164164}
165165
166+ type fcmQuotaViolation struct {
167+ Subject string `json:"subject"`
168+ Description string `json:"description"`
169+ APIService string `json:"api_service"`
170+ QuotaMetric string `json:"quota_metric"`
171+ QuotaID string `json:"quota_id"`
172+ QuotaDimensions map [string ]string `json:"quota_dimensions"`
173+ QuotaValue int64 `json:"quota_value"`
174+ FutureQuotaValue int64 `json:"future_quota_value"`
175+ }
176+
166177type fcmErrorDetail struct {
167- Type string `json:"@type"`
168- ErrorCode string `json:"errorCode"`
169- Violations []struct {
170- Subject string `json:"subject"`
171- Description string `json:"description"`
172- APIService string `json:"api_service"`
173- QuotaMetric string `json:"quota_metric"`
174- QuotaID string `json:"quota_id"`
175- QuotaDimensions map [string ]string `json:"quota_dimensions"`
176- QuotaValue int64 `json:"quota_value"`
177- FutureQuotaValue int64 `json:"future_quota_value"`
178- } `json:"violations"`
178+ Type string `json:"@type"`
179+ ErrorCode string `json:"errorCode"`
180+ Violations []fcmQuotaViolation `json:"violations"`
179181}
180182
181183func handleFCMError (resp * internal.Response ) error {
0 commit comments