added extension method for ajax error handling

__Tasks:__

- [ ] gather feedback for my changes


__Informations:__

| Q             | A
| ------------- | ---
| Tests pass?   | yes
| Fixed tickets | fixes sulu-cmf/sulu-standard#110
| BC Breaks     | none
| Doc           | none