Skip to content

Commit

Permalink
improve invalid param error text
Browse files Browse the repository at this point in the history
  • Loading branch information
slavaleleka committed May 10, 2023
1 parent a1bd1da commit bb234c4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/scriptlets/prevent-fetch.js
Original file line number Diff line number Diff line change
Expand Up @@ -113,15 +113,15 @@ export function preventFetch(source, propsToMatch, responseBody = 'emptyObj', re
} else if (responseBody === 'emptyArr') {
strResponseBody = '[]';
} else {
logMessage(source, `Invalid responseBody parameter: ${responseBody}`);
logMessage(source, `Invalid responseBody parameter: '${responseBody}'`);
return;
}

// Skip disallowed response types,
// specified responseType has limited list of possible values
if (typeof responseType !== 'undefined'
&& !(responseType === 'default' || responseType === 'opaque')) {
logMessage(source, `Invalid responseType parameter: ${responseType}`);
logMessage(source, `Invalid responseType parameter: '${responseType}'`);
return;
}

Expand Down

0 comments on commit bb234c4

Please sign in to comment.