Skip to content

Commit d20ec7e

Browse files
committed
fix: exclude 429 from linter
1 parent b4652a6 commit d20ec7e

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

isp-rules.yaml

Lines changed: 3 additions & 2 deletions
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)