Skip to content

Comments

feat: validate that onlyOn: NETWORK_ERROR is only used with ApiCheck/UrlMonitor [sc-24520]#1123

Merged
sorccu merged 2 commits intomainfrom
simokinnunen/sc-24520/limit-to-api-checks-and-url-monitors
Jul 23, 2025
Merged

feat: validate that onlyOn: NETWORK_ERROR is only used with ApiCheck/UrlMonitor [sc-24520]#1123
sorccu merged 2 commits intomainfrom
simokinnunen/sc-24520/limit-to-api-checks-and-url-monitors

Conversation

@sorccu
Copy link
Member

@sorccu sorccu commented Jul 23, 2025

Using RetryStrategy.onlyOn with checks/monitors other than ApiCheck/UrlMonitor will now produce the following validation error:

✖ [TcpMonitor:tcpsample-1] Invalid property value

  The value provided for property "retryStrategy" is not valid.

  Reason: Using "NETWORK_ERROR" with "onlyOn" is only supported in the
  ApiCheck and UrlMonitor constructs.

✖ [BrowserCheck:browsersample-1] Invalid property value

  The value provided for property "retryStrategy" is not valid.

  Reason: Using "NETWORK_ERROR" with "onlyOn" is only supported in the
  ApiCheck and UrlMonitor constructs.

Also, using any other value for onlyOn will produce the following error (in addition to TypeScript showing an error):

✖ [BrowserCheck:browsersample-1] Invalid property value

  The value provided for property "retryStrategy" is not valid.

  Reason: Unsupported value "FOO" for "onlyOn".

Affected Components

  • CLI
  • Create CLI
  • Test
  • Docs
  • Examples
  • Other

Notes for the Reviewer

Resolves #[issue-number]

New Dependency Submission

@sorccu sorccu merged commit a34c701 into main Jul 23, 2025
5 of 6 checks passed
@sorccu sorccu deleted the simokinnunen/sc-24520/limit-to-api-checks-and-url-monitors branch July 23, 2025 10:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant