Connect and rearrange jasmite unit test, create custom http errors handler