Fixes

Raises error when status code is larger or equal to 400 instead of 300; adds response headers to the exception; updates the test on indexing policy.