Skip to main content

Function: resolveRequiredMonitorUrlField()

resolveRequiredMonitorUrlField(monitor: object, fieldName: string, errorMessage: string, protocols?: readonly string[]): RequiredMonitorStringFieldResult

Defined in: electron/services/monitoring/shared/monitorConfigValueResolvers.ts:61

Reads and validates a required URL field from a monitor object.

Parameters

monitor

object

Monitor-like object containing configuration fields.

fieldName

string

URL field key to resolve.

errorMessage

string

https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global\_Objects/Error message returned when the field is missing or invalid.

protocols?

readonly string[]

Optional allowed protocols passed to URL validation.

Returns

RequiredMonitorStringFieldResult

Discriminated result containing either a validated URL or a validation message.