Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

14 error display #22

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from
Draft

14 error display #22

wants to merge 2 commits into from

Conversation

PeteCoward
Copy link
Member

@PeteCoward PeteCoward commented Aug 3, 2020

fixes #14

Allows configuring of 401, 403, 412, unknown error messages, and displays those messages to the user through the standard browser form validation UI.

Adds some backend submit endpoints that are just useful for developing this component, logging requests, and storing things in the cache, this part is very much not designed for use in production!

reject(err.message, err)
// 598 (Informal convention) Network read timeout error
// used here to indicate generic failure
reject(598)
Copy link
Member Author

@PeteCoward PeteCoward Aug 3, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not really decided what to send back here, code -1, string 'fetch error'?

@@ -83,6 +89,7 @@ export default async function initialise(config) {

// what happens when a key is hit in the input
inputElement.onkeyup = function(e) {
inputElement.setCustomValidity('');
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the main reason this PR is still draft. It clears the validation on input, but causes an ugly flicker on submission with enter :/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Handle Errors better, 403, 412 etc...
1 participant