runs fine locally but 400 error in static web app

Mattias Clouse 0 Reputation points
2024-06-06T18:29:00.46+00:00

My react app works perfectly when run locally with the command swa start --data-api-location swa-db-connecitions but when I push the repository to azure static web apps, I get a 400 error.

Azure Static Web Apps
Azure Static Web Apps
An Azure service that provides streamlined full-stack web app development.
819 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. SnehaAgrawal-MSFT 19,596 Reputation points
    2024-06-10T12:24:01.26+00:00

    @Mattias Clouse Thanks for reaching here!

    It seems like there is an issue with your deployment to Azure Static Web Apps.

    A 400 error usually indicates that the server was unable to process the request due to invalid syntax. This could be caused by a number of things, such as incorrect configuration settings or missing dependencies.

    To troubleshoot this issue, I would recommend checking the following:

    Make sure that your Azure Static Web App is properly configured to use the correct build settings and environment variables

    Suggest you refer this article on step-by-step guides to troubleshooting deployment and other issues for your static web app.

    Please let us know if issue remains, Happy to assist you further.

    0 comments No comments