Fix interface of formatter and improve 406 response