IMHO a 404 if fine, if you don't need the json back in the javascript a simple NotFoundHttpException will be sufficient i think !