added extension method for ajax error handling

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