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

Add 401 and 403 error messages for put saver #5638

Merged

Conversation

simonbaird
Copy link
Contributor

@simonbaird simonbaird commented Apr 25, 2021

Show the user a more useful message for the case where they're not
correctly authenticated and try to do a "put" save.

The context for this change is that I'm thinking about using the
put saver for TiddlyHost instead of the old upload saver, but it
should be generally useful.

Also includes a name change for the one existing error message. I
want to indicate these three messages are related, so I added the
"Put" prefix to make them appear next to each other in the language
files. (The Error/EditConflict string is used in just this one place
as far as I can tell.)

@simonbaird
Copy link
Contributor Author

FYI @pmario @Jermolene . This will make the put saver more user friendly for TiddlyHost.

@simonbaird
Copy link
Contributor Author

See also tiddlyhost/tiddlyhost-com#148 .

@Jermolene
Copy link
Member

Hi @simonbaird that looks great. You don't need to worry about the translations; the translators tool picks up core strings that haven't been translated into a particular language.

@simonbaird
Copy link
Contributor Author

simonbaird commented Apr 25, 2021

The message could perhaps be more verbose, e.g.:

Permission denied. It appears you don't have permission to save this TiddlyWiki to {saveUrl}.

Authentication required. You need to authenticate in order to save this TiddlyWiki at {saveUrl}.

@simonbaird
Copy link
Contributor Author

I also considered moving the messages to PutError/* instead of Error/* which would make sense if they were going to be specific to put saving.

@simonbaird
Copy link
Contributor Author

Ack, will push a revision soon without the translations

@simonbaird simonbaird force-pushed the put-saver-401-and-403-errors branch 2 times, most recently from d161032 to 6720fc6 Compare April 25, 2021 22:09
Show the user a more useful message for the case where they're not
correctly authenticated and try to do a "put" save.

The context for this change is that I'm thinking about using the
put saver for TiddlyHost instead of the old upload saver, but it
should be generally useful.

Also includes a name change for the one existing error message. I
want to indicate these three messages are related, so I added the
"Put" prefix to make them appear next to each other in the language
files. (The Error/EditConflict string is used in just this one place
as far as I can tell.)
@simonbaird
Copy link
Contributor Author

Moving out of draft mode. There's a few changes since the original. Let me know if you don't like it.

@simonbaird simonbaird marked this pull request as ready for review April 25, 2021 22:18
@Jermolene Jermolene merged commit 30d2319 into TiddlyWiki:master Apr 27, 2021
@Jermolene
Copy link
Member

Thanks @simonbaird, great stuff.

@simonbaird
Copy link
Contributor Author

Awesome, thanks @Jermolene .

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.

2 participants