Available Filter Criteria
This lists every all of the filter criteria in use in Hawk. Most criteria are only available for a particular type of filter; for instance, a JavaScript error filter cannot use the method criterion, which filters according to the method of a network request.
- Hostname: For network request errors, this filters on the hostname the request was directed to.
- Method: For network request errors, this filters on the method of the request.
- Page hostname: This filters on the hostname of the user’s location when the error occurred.
- Path: For network request errors, this filters on the path (include the
/
. For example:/amazing
matcheshttps://amazingintegrations.com/amazing
) - Url: For network request errors, this filters on the entire url.
- Page url: This filters on the url of the user’s location when the error occurred.
- Page path: This filters on the path of the user’s location when the error occurred.
- Class:
- For a JavaScript error, the name of the constructor. (
SyntaxError
inthrow new SyntaxError('Whoops!')
) - For an unhandled promise rejection, the rejection reason. (
TypeError
inPromise.reject(new TypeError('Whoops!'))
)
- For a JavaScript error, the name of the constructor. (
- Message:
- For a JavaScript error, the first argument the browser passes to the
window.onerror
function. - For an unhandled promise rejection object, the
message
property of that object. - For an unhandled promise rejection string, the whole string.
- For a JavaScript error, the first argument the browser passes to the
- Site: This filters on which of your sites produced the error.
- Type: This filters on the type of error. Currently-supported types are
error
,fetch
,unhandledrejection
andxhr
- User: This filters on the identity of the user. For information on identifying users, see here.
- Status: For network request errors, this filters on the response status (
404
,502
, etc). - ResponseJson: For network request errors, this filters on the response body. Uses dot notation.
- Stack: For promise rejections and script errors, this filters on the error’s stack trace. It is treated like a single, long string.
- Rejection Reason: For promise rejections, filters on the rejection reason object. Uses dot notation.
- Error Object: For script errors, this filters on the error object. Uses dot notation.
Dot Notation
Hawk’s dot notation is based on JavaScript’s dot notation property accessor.
- Entering a string without any dots (like
xyz
) will match any field with that name, no matter how deeply nested it is in the body. - Use a dot (like
xyz.abc
) to specify a field on the error object: in this case, only theabc
field of thexyz
object will be hidden. Thexyz
object could be anywhere in the body. - Use a number (like
xyz.2.abc
) to specify a position within an array: in this case, theabc
field on the third object in thexyz
array will match.
Comparators

(Note: Not all comparators are valid for all filter criteria.)
- Is: Matches when the specified string and the result are identical.
- Is Not: Matches when the specified string and the result are different.
- Starts With: Matches when the specified string appears at the beginning of the result.
- End With: Matches when the specified string appears at the end of the result.
- Matches: Allows you to enter a regular expression. Matches if the regular expression matches.
- Does Not Match: Allows you to enter a regular expression. Matches if the regular expression does not match.
- GT: Greater than. Only used for numbers.
- LT: Less than. Only used for numbers.
- Between: Allows you to supply two numbers. Matches when the result is between them.
- Field.Name: Only used for the resoponseJSON criterion. This specifies a location within the response JSON to match.
- Is Truthy: Matches when the result is truthy.
- Is Falsy: Matches when the result is falsy.