[Mediawiki-api-announce] BREAKING CHANGE: Parameter validation error codes

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

[Mediawiki-api-announce] BREAKING CHANGE: Parameter validation error codes

Brad Jorsch (Anomie)
The error codes that may be changing are some of those representing invalid values for API parameters. Notably, the following will change:
  • "noX", indicating that a required parameter was not specified, becomes "missingparam".
  • "unknown_X", indicating that an unrecognized value was specified for an enumerated-value parameter, becomes "badvalue".
  • "too-many-X", indicating that too many values were supplied to a multi-valued parameter, becomes "toomanyvalues".
  • "baduser_X", "badtimestamp_X", and so on become "baduser", "badtimestamp", and so on.
Note this is not a comprehensive list, other codes may be changing as well.

These changes make the error codes more predictable, at the expense of not indicating in the code which parameter specifically triggered the error. If you have a use case where knowing which parameter triggered the error is needed, please let us know (by replying to this message or by filing a request in Phabricator) and we'll add the necessary error metadata.

The human-readable text is also changing for some of these errors (with or without error code changes), and for a few the error metadata may be changing (e.g. "botMax" changes to "highmax" for limit-type warnings in non-back-compat error formats).

This change will most likely go out to Wikimedia wikis with 1.35.0-wmf.19. See https://www.mediawiki.org/wiki/MediaWiki_1.35/Roadmap for a schedule.

--
Brad Jorsch (Anomie)
Senior Software Engineer
Wikimedia Foundation

_______________________________________________
Mediawiki-api-announce mailing list
[hidden email]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-api-announce

_______________________________________________
Mediawiki-api mailing list
[hidden email]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-api
Reply | Threaded
Open this post in threaded view
|

Re: [Mediawiki-api-announce] BREAKING CHANGE: Parameter validation error codes

Furkan Gözükara
How can i get file full path from file template?

For example * {{audio|en|en-us-dictionary.ogg|Audio (US, California)}}

On Tue, Feb 4, 2020 at 9:25 PM Brad Jorsch (Anomie) <[hidden email]> wrote:
The error codes that may be changing are some of those representing invalid values for API parameters. Notably, the following will change:
  • "noX", indicating that a required parameter was not specified, becomes "missingparam".
  • "unknown_X", indicating that an unrecognized value was specified for an enumerated-value parameter, becomes "badvalue".
  • "too-many-X", indicating that too many values were supplied to a multi-valued parameter, becomes "toomanyvalues".
  • "baduser_X", "badtimestamp_X", and so on become "baduser", "badtimestamp", and so on.
Note this is not a comprehensive list, other codes may be changing as well.

These changes make the error codes more predictable, at the expense of not indicating in the code which parameter specifically triggered the error. If you have a use case where knowing which parameter triggered the error is needed, please let us know (by replying to this message or by filing a request in Phabricator) and we'll add the necessary error metadata.

The human-readable text is also changing for some of these errors (with or without error code changes), and for a few the error metadata may be changing (e.g. "botMax" changes to "highmax" for limit-type warnings in non-back-compat error formats).

This change will most likely go out to Wikimedia wikis with 1.35.0-wmf.19. See https://www.mediawiki.org/wiki/MediaWiki_1.35/Roadmap for a schedule.

--
Brad Jorsch (Anomie)
Senior Software Engineer
Wikimedia Foundation
_______________________________________________
Mediawiki-api-announce mailing list
[hidden email]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-api-announce
_______________________________________________
Mediawiki-api mailing list
[hidden email]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-api

_______________________________________________
Mediawiki-api mailing list
[hidden email]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-api