change 404 not found to json error