Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

This is weird! I just checked it on multiple browser it works, Can you try again?


Tried just now, same error.

I don't understand one thing, how come despite getting 405, I am getting success "Thank you, please check your email!" message? Are you not checking the status (error) code before showing the message?

  {
    "message": "Request failed with status code 405",
    "name": "AxiosError",
    "stack": "AxiosError: Request failed with status code 405\n    at https://howtogetgithubstars.com/_next/static/chunks/356-dd9ab9f01a6d62a9.js:6:39972\n    at XMLHttpRequest.f (https://howtogetgithubstars.com/_next/static/chunks/356-dd9ab9f01a6d62a9.js:6:40112)",
    "config": {
        "transitional": {
            "silentJSONParsing": true,
            "forcedJSONParsing": true,
            "clarifyTimeoutError": false
        },
        "adapter": [
            "xhr",
            "http"
        ],
        "transformRequest": [
            null
        ],
        "transformResponse": [
            null
        ],
        "timeout": 0,
        "xsrfCookieName": "XSRF-TOKEN",
        "xsrfHeaderName": "X-XSRF-TOKEN",
        "maxContentLength": -1,
        "maxBodyLength": -1,
        "env": {},
        "headers": {
            "Accept": "application/json, text/plain, */*",
            "Content-Type": "application/json"
        },
        "method": "post",
        "url": "/api/newsletter",
        "data": "{\"email\":\"test@pokemail.net\"}"
    },
    "code": "ERR_BAD_REQUEST",
    "status": 405
}


It's because I am not waiting for the status of the request. However, I don't udnerstand what this error is, it's a simple NextJS app.




Consider applying for YC's Winter 2027 batch! Applications are open till November 2.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: