@Marco Junior , Apologies for the delayed response from over the weekend.
To better assist you on this. You could capture a network trace (when reproducing the error) via F12 developer tools (Network tab) in the browser to fetch more details on the error.
Kindly do provide details about your setup and framework - When you map a custom domain to a static web app, you have a few options available to you. You can configure subdomains and an apex domain. Some registrars like GoDaddy and Google don't support domain records that affect how you configure your apex domain. Kindly check this doc for more info.
You may perform dig - http://www.digwebinterface.com to view and validate the associated records added.
See, DNS records configuration -
You may enable and review the logs as outlined in this doc - Troubleshooting deployment and runtime errors to fetch additional info.
You may add a staticwebapp.config.json file into the root of your project to handle redirecting, see if this makes any difference.