Skip to content

Commit dbe4215

Browse files
Merge branch 'develop'
2 parents d4ab2a9 + 2bb4e76 commit dbe4215

File tree

2 files changed

+15
-1
lines changed

2 files changed

+15
-1
lines changed

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
## [Unreleased]
99

10+
## [0.8.1] - 2026-02-27
11+
12+
### Fixed
13+
- **Cloudflare Provider**: Fix JSON parsing failure on API responses — Cloudflare
14+
changed `messages` field from `[]string` to `[]object` (matching `errors` shape),
15+
causing `json: cannot unmarshal object into Go struct field` on every API call
16+
1017
## [0.8.0] - 2026-02-27
1118

1219
### Added

providers/cloudflare/client.go

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,18 @@ type apiError struct {
2626
Message string `json:"message"`
2727
}
2828

29+
// apiMessage represents a message from the Cloudflare API.
30+
// Cloudflare returns messages as objects with code/message fields (same shape as errors).
31+
type apiMessage struct {
32+
Code int `json:"code"`
33+
Message string `json:"message"`
34+
}
35+
2936
// apiResponse is the standard Cloudflare API response wrapper.
3037
type apiResponse struct {
3138
Success bool `json:"success"`
3239
Errors []apiError `json:"errors"`
33-
Messages []string `json:"messages"`
40+
Messages []apiMessage `json:"messages"`
3441
Result json.RawMessage `json:"result"`
3542
}
3643

0 commit comments

Comments
 (0)