Page MenuHomePhabricator

Fix troublesome error messages
Closed, ResolvedPublic

Description

From comments in code review (r77100):

+ 'mwe-upwiz-api-error-http' => 'There a problem connecting to the service.', ?Unable to connect to the service.

+ 'mwe-upwiz-api-error-ok-but-empty' => 'The server didn\'t return any information about the upload.',

MediaWiki style doesn't use contractions. Does this mean we didn't get any reply from the server?

+ 'mwe-upwiz-api-error-unknown-code' => 'The server returned an error we did not understand: "$1"',

?Unknown error

Is $1 a error code or explanation (in English?)

+ 'mwe-upwiz-api-error-uploaddisabled' => 'Uploading is disabled on this wiki.',

?Uploading of files

+ 'mwe-upwiz-api-error-nomodule' => 'The wiki did not know how to handle this upload.',

How to handle the file format or something else? The user should know what he can do, or nothing if that is the case.

+ 'mwe-upwiz-api-error-mustbeposted' => 'There\'s a bug in this software; it\'s not using the proper HTTP method.',

Again, what can the user do in this unlikely situation?

+ 'mwe-upwiz-api-error-badaccess-groups' => 'You aren\'t permitted to upload files to this wiki. Check what access groups you belong to.',

Would be nice to fetch this information for the user. I haven't seen term access group used anywhere else.

+ 'mwe-upwiz-api-error-stashfailed' => 'The wiki could not store the file.',

Temporarily or always?

+ 'mwe-upwiz-api-error-missingparam' => 'The upload didn\'t have all the required information (probably a bug in this uploader.)',

Should it print also the param to aid in bug reporting? Is it possible to automatically log these cases to somewhere?

+ 'mwe-upwiz-api-error-invalid-session-key' => 'The server couldn\'t find that file in your uploaded files.',

Which file? We have quite standard wording for session errors in MediaWiki itself.

+ 'mwe-upwiz-api-error-copyuploaddisabled' => 'Uploads by copying are disabled.',

Should try to say more clearly what Upload by copy is. Is it the same thing as upload from url?

+ 'mwe-upwiz-api-error-mustbeloggedin' => 'You are not properly logged in.',

properly? is there some kind of middle state?

+ 'mwe-upwiz-api-error-file-too-large' => 'The file you submitted was too large.',

Can this be catched before upload? Are the limits shown anywhere?

+ 'mwe-upwiz-api-error-filetype-banned' => 'This type of file is banned.',

?Files of this type cannot be uploaded?

+ 'mwe-upwiz-api-error-illegal-filename' => 'The filename is not allowed.',

Does the user after seeing this error have any idea how to fix it?

+ 'mwe-upwiz-api-error-overwrite' => 'Overwriting an existing file is not allowed.',

Is this true? I think some users can do that. Also, in quick reading of the API code, I did not find place where this error could be detected.

+ 'mwe-upwiz-api-error-badtoken' => 'The "token" we use to identify you to the server was bad.',

"token"? Is it a real token or not?

+ 'mwe-upwiz-api-warning-duplicate' => 'There is another file already on the wiki with the same content',

Can we provide the filename(s) too?


Version: unspecified
Severity: enhancement

Details

Reference
bz27098

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 11:22 PM
bzimport added a project: UploadWizard.
bzimport set Reference to bz27098.

I did some cleanup in r81509, giving most of the you-couldnt-do-much-about-it
errors an 'Internal error:' prefix and tidying up language.

A general note:

+ 'mwe-upwiz-api-error-file-too-large' => 'The file you submitted was too

large.',

Can this be catched before upload? Are the limits shown anywhere?

It sure can, but if the error happens afterwards (either we didn't catch a
limit properly, or the limits changed, etc) we still need to output it.

As with the various other errors, getting information will vary and may or may
not already be done elsewhere, but outputting basic error messages is a step up
from nothing. Implementing those better, if they're not already handled, should
be individually addressed in distinct bugs.