Handling Top-Level Errors In A Promise Workflow In AngularJS

The naked version.