@salesforce/b2c-tooling-sdk / safety / checkLevelViolation
Function: checkLevelViolation() ​
checkLevelViolation(
method,path,level):string|undefined
Defined in: packages/b2c-tooling-sdk/src/safety/safety-middleware.ts:116
Checks if an HTTP operation should be blocked based on a safety level.
This is the low-level level check. For full rule-based evaluation, use SafetyGuard.evaluate.
Parameters ​
method ​
string
HTTP method (GET, POST, PUT, PATCH, DELETE)
path ​
string
URL pathname
level ​
Safety level to check against
Returns ​
string | undefined
Error message if blocked, undefined if allowed