Skip to content

Commit

Permalink
fix: exclude 429 from linter
Browse files Browse the repository at this point in the history
  • Loading branch information
jpkalbacher committed Dec 10, 2024
1 parent b4652a6 commit d20ec7e
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions isp-rules.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -140,8 +140,9 @@ rules:
# Errors must include a `detail` field
error-detail:
severity: error
description: Errors must be problem+JSON and include a "detail" field
given: $..responses.[?(@property.toString().startsWith("4") || @property.toString() === "500")]
# 429 returns from the API Gateway, so we exclude it
description: Errors must be problem+JSON or text/plain and include a "detail" field
given: $..responses.[?(@property.toString().startsWith("4") || @property.toString() === "500") && @property.toString() != "429"]
then:
- field: content
function: truthy
Expand Down

0 comments on commit d20ec7e

Please sign in to comment.