Home Forums Newsletter Developers Getting 404 rest_no_route error when user email has an underscore

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #262112
    Bruno Faúndez
    Participant

    I was experiencing errors with a particular user and I realized that the error only happens when the user email has one or more underscores.

    I was calling:

    `
    GET https://blog.tinvi.to/wp-json/newsletter/v2/subscribers/example_example@hotmail.com/
    `

    and getting:

    `
    {
    “code”: “rest_no_route”,
    “message”: “No se ha encontrado la ruta que coincida con la URL y el método de la solicitud”,
    “data”: {
    “status”: 404
    }
    }
    `

    When the user is not registered, the error is different, as it properly finds the rest route:

    `
    {
    “code”: -1,
    “message”: “Subscriber does not exist”,
    “data”: {
    “status”: 404
    }
    }
    `

    It may be caused by the way WordPress interprets routes, but I’m not sure since I’m not specialized on WordPress (I’m calling the API using Postman and also axios.js in node.js).

    #262159
    Stefano
    Keymaster

    Thank you for reporting, we release an update in few minutes!

    #262174
    Gioacchino
    Keymaster

    Hi,
    in order to see the update you have to save the newsletter general settings to force cache reset.

    #262189
    Bruno Faúndez
    Participant

    Thank you @Stefano! It’s working properly now!

    Also thank you, @Gioacchino. I did that and the update appeared on my list.

    Now my integration is working great 🙂

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.