Fix HTTP error when elastic return 201 HTTP code