correct response code, move mapping to es service