Flow exceptions report a a specific "message from exception, used for debugging error" as well as a generic error code that is localized and shown to the user. It seems exceptions in API calls don't return the former, making them harder to debug.
To reproduce:
Stop the parsoid service and issue an action=flow-parsoid-utils request such as:
The API response is
{"error":{
"code":"flow-error-process-wikitext",
"info":"An error has occurred while processing HTML/wikitext conversion."
}}but this error code is returned for a number of problems:
throw new WikitextException( 'Unknown source format: ' . $from, 'process-wikitext' ); throw new WikitextException( 'Failed contacting Parsoid', 'process-wikitext' ); throw new WikitextException( "Unknown format requested: " . $to, 'process-wikitext' ); throw new WikitextException( 'Parser only supports wikitext to HTML conversion', 'process-wikitext' );
It would be nice if the API response included the exception $message (instead of/as well as the English translation of the error code). It doesn't need to be localized and shouldn't be presented to the user.
Version: master
Severity: minor