Skip to content

Commit 1e8990d

Browse files
authored
Merge pull request #36 from istreamlabs/fixLinter429
fix: exclude 429 from linter
2 parents b4652a6 + 53e6691 commit 1e8990d

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

isp-rules.yaml

+3-2
Original file line numberDiff line numberDiff line change
@@ -140,8 +140,9 @@ rules:
140140
# Errors must include a `detail` field
141141
error-detail:
142142
severity: error
143-
description: Errors must be problem+JSON and include a "detail" field
144-
given: $..responses.[?(@property.toString().startsWith("4") || @property.toString() === "500")]
143+
# 429 returns from the API Gateway, so we exclude it
144+
description: Errors must be problem+JSON or text/plain and include a "detail" field
145+
given: $..responses.[?((@property.toString().startsWith("4") || @property.toString() === "500") && @property.toString() != "429")]
145146
then:
146147
- field: content
147148
function: truthy

0 commit comments

Comments
 (0)