Use abort function to do content-type negotiation & return either JSON or HTML error msg dependent on header