Code Monkey home page Code Monkey logo

Comments (10)

danielireson avatar danielireson commented on July 3, 2024 1

I think it might potentially be that you're using the wrong http method? I've just been able to POST successfully to your endpoint, are you perhaps doing a GET instead? That would tie in with the missing authentication token error as there's no GET route.

from formplug.

danielireson avatar danielireson commented on July 3, 2024

Hi Chris, that error is from API Gateway and is usually returned when you're using the wrong URL or one that doesn't exit.

from formplug.

Bechrissed avatar Bechrissed commented on July 3, 2024

Hi Daniel, thanks. I've checked the url (https://d4o3vwxlsg.execute-api.eu-west-1.amazonaws.com/prd/?format=json) and copy/pasted the endpoint. Unfortunatly the problem persists. Tried to run "serverless deploy" again but it returns same endpoint. Probably because nothing changed.

from formplug.

Bechrissed avatar Bechrissed commented on July 3, 2024

Found some more info here: https://forums.aws.amazon.com/thread.jspa?threadID=192977, will try some suggested solutions as url is correct for as far as I can see

from formplug.

Bechrissed avatar Bechrissed commented on July 3, 2024

Yes that was the issue. I'm now facing an HTTP 422 error from cloudfront :s

I've never heard of 422 so have to google what's going wrong there.

from formplug.

Bechrissed avatar Bechrissed commented on July 3, 2024

Ah lol found it: {"statusCode":422,"message":"Please provide a recipient in '_to' field"}

from formplug.

danielireson avatar danielireson commented on July 3, 2024

Good to hear you've fixed the issue, closing.

from formplug.

Bechrissed avatar Bechrissed commented on July 3, 2024

@danielireson is it an idea to also add an OPTIONS method to the API? I've added this myself now with a mock behind it but it does return the correct CORS headers. My ajax library (Axios) sends an OPTIONS request as part of the preflight for the ajax request. I know this can also be solved in Axios itself by changing the Content-Type headers but adding it to the API would make Formplug work out of the box in more situations.

from formplug.

Bechrissed avatar Bechrissed commented on July 3, 2024

Hmmmmm, also unable to fix error 422: {"statusCode":422,"message":"Please provide a recipient in '_to' field"}

_to field is filled, tried both encrypted an unencrypted:

firstName: saddas
lastName: asdsda
email: asasdds
phone: asdadsads
message: asdasdasasd
_honeypot:
_to: [email protected]

Any suggestions how to debug more?

from formplug.

Bechrissed avatar Bechrissed commented on July 3, 2024

Never mind got it fixed :)

from formplug.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.