javascriptreactjshttphttprequestlocked

Request failed with status code 423 - React Project


I am trying to run an old react app, it compiles successfully on Terminal but on the browser it does not run and gives me this message "Request failed with status code 423"

I am a beginner, I have searched and found this: The 423 Locked status code means the source or destination resource of a method is locked. This response SHOULD contain an appropriate precondition or postcondition code, such as ‘lock-token-submitted’ or ‘no-conflicting-lock’.

But I don't know what should I do. Any idea or solution?


Solution

  • first, you have to find the API call that makes the error, then handle/catch the error to prevent app crashing, e.g:

    catch method:

    axios(...).catch(console.error);
    

    async/await:

    async function apiCall() => {
        try {
            const {
                data
            } = axios(...);
        } catch (error) {
            console.error(error)
        }
    }
    

    and about the HTTP request error, you should ask about that from the API maintainer/developer.