Last modified: 2014-06-23 21:30:51 UTC
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: http://localhost/w/api.php?action=flow-parsoid-utils&format=json&from=wikitext&to=html&content=Hello&title=Main_Page 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.