Ensure we have a valid event before acting

- Moved logic for determining if we have:
  - an error
  - with an HTTP request
  - that Accepts a JSON mediatype
  to a new method.
- onRender() and onDispatchError() both use the new method.
Merge branch 'hotfix/event-response'

Close #7