Error validation, no return message

Hello, mine system is not returning the treated messages, locally on the server it works, however when going through the cloudflare it ignores the edit messenger to default

External cloudflare

controller I’m using
[HttpPost, ValidateInput(false)]
public ActionResult CarregaInstituicao()
if (ModelState.IsValid)
var retorno = Modelo.salvarInstituicao(Modelo.InstituicaoCRUD);
catch (ValidacaoException ex)
Response.StatusCode = 400;
Response.StatusDescription = (“Erro:\n” + ex.Erro() + “\n\nDica:\n” + ex.Dica()).Replace("\n", “#”);
catch (Exception ex)
Response.StatusCode = 500;
Response.StatusDescription = (“Erro:\nOcorreu um erro inesperado no sistema\n\nDica:\n” + ex.ToString()).Replace("\n", “#”);
return Json("Sucesso " + retorno);
SSL configuration is flex ,
I’ve already done tests disabling https,
disabling all ssl,
HTTP/2 disabled

I have exhausted the options I have knowledge.

Firstly, please fix your SSL. You should not disable HTTPS/SSL, it will create an insecure connection for yourself and all visitors. Please fix that and set your SSL Mode to “Full (Strict)”

After that, I’m not sure if Cloudflare will keep a modified status text. You shouldn’t use status text for error messages though, you should use the returned body.

1 Like

yes it was just a test
cloudflare does not store the message body?

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.