Used , but it only detects specific errors - see angularjs docs