toastdotdev / toast

The best place to stack your JAM. Toast is a Jamstack framework
153 stars 13 forks source link

createPage requires all fields #31

Closed ChristopherBiscardi closed 3 years ago

ChristopherBiscardi commented 3 years ago

Currently the createPage call parses some data into a CreatePage struct. #29 will change this, but we should be capable of handling missing field names and failing gracefully if we can't parse a CreatePage.

Currently with a missing data field, we get a 422 error on the client, which is not useful for the user. We can check for this in the JS before sending too to save the round-trip.

ChristopherBiscardi commented 3 years ago

error message and missing field name support is in