JavaScript errors tracker
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.

Hawk JavaScript Catcher

Hawk is a platform for errors and logs monitoring.

You can find web interface and documentation on


We recommend to add Hawk script to page above others to prevent missing any errors.

Install via NPM or Yarn

Install package

npm install hawk.javascript --save
yarn add hawk.javascript

Then require hawk.javascript module

const hawk = require('hawk.javascript');

Load from CDN

Get newest bundle path from RawGit — open site and paste link to JS bundle in repository.

Note: use production link with commit hash to avoid issues with caching.

Then require this script on your site.

<script src="..." async></script>

Or upload it to your project

Download hawk.js file and add it to all pages of your site.

<script src="hawk.js" async></script>


Get token

First of all, you should register an account on

Then create a new Project. You'll get an Integration Token.

Initialize Hawk

Call the hawk.init() method when script will be ready and pass your Integration Token:

hawk.init({token: 'INTEGRATION_TOKEN'});

// or 


Alternately, add onload="hawk.init({token: 'INTEGRATION_TOKEN'})" attribute to the <script> tag.

<script src="" onload="hawk.init(token)"></script>

Source map support

Hawk supports JS SourceMaps for showing more useful information from your minified bundle. There a few conditions:

  1. Bundle ends with line contains anchor to the source map, like //# It can be absolute or relative (relatively the bundle) path.
  2. Source map are publicly available by its URL.
  3. Every build you are updating the revision and pass it with init method. It can be heximal-hash or simply file's modification timestamp.
hawk.init({token: 'INTEGRATION_TOKEN', revision: 12345654345})

Testing and server responses

To make sure that Hawk is working right, call hawk.test() method in browser's console. test method sends fake error to server. So if you get it in your profile, everything works correctly.

Also in browser's console you can find out some Hawk warnings and server responses. For example, if you get Access denied response, something wrong with your token.