Skip to content

Commit e2d2e7f

Browse files
authored
fix(v0.8.4): prevent panic in report template when dump fails (#253)
* fix: prevent panic in report template when dump fails replace panics with error messages in the dump template function, allowing test reports to render gracefully on timeouts fixes #251 * docs: add changelog for v0.8.4
1 parent d3f6a67 commit e2d2e7f

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,13 @@ All notable changes to this project will be documented in this file.
44
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
55
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
66

7+
## [0.8.4] - 2025-12-12
8+
### Fixed
9+
- Prevent panic in report template when dump fails, allowing test reports to render gracefully on timeouts. [#253](https://github.com/ipfs/gateway-conformance/pull/253)
10+
11+
### Changed
12+
- Use official ipfs org for `munge.js` instead of fork. [d3f6a67](https://github.com/ipfs/gateway-conformance/commit/d3f6a679d5f3e7cc67e5c801deaf8f36c9dc4348)
13+
714
## [0.8.3] - 2025-09-01
815
### Changed
916
- Added temporary support for legacy 200 with X-Stream-Error header behavior when missing blocks are detected during CAR streaming. This ensures compatibility with current boxo/gateway implementations that defer header setting. This third option will be removed once implementations ship with [ipfs/boxo#1019](https://github.com/ipfs/boxo/pull/1019). [#245](https://github.com/ipfs/gateway-conformance/pull/245)

tooling/test/report.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,11 +74,11 @@ func report(t *testing.T, test SugarTest, req *http.Request, res *http.Response,
7474
// "http: ContentLength=6 with Body length 0"
7575
b, err = httputil.DumpResponse(v, false)
7676
default:
77-
panic("unknown type")
77+
return fmt.Sprintf("error: unknown type %T", v)
7878
}
7979

8080
if err != nil {
81-
panic(err)
81+
return fmt.Sprintf("error: failed to dump %T: %v", v, err)
8282
}
8383

8484
return string(b)

0 commit comments

Comments
 (0)