Task #2760
Updated by amacdona@redhat.com over 7 years ago
The "Contributing Guide":http://docs.pulpproject.org/en/3.0/nightly/contributing/index.html part of the docs needs a new top-level section added to it called "Error Handling". Inside of that page a section on "Errors in Tasks" should also be added about how errors are handled while running a task. The basic things to get across are that: * Uncaught exceptions are treated as fatal exceptions, the task is marked as failed, and the error representation is returned to the user as the task 'error'. * Built-In General Python exceptions [0] should be used whenever possible. * Coded exceptions should be used for known error situations. These should link to "<code>PulpException</code>":http://docs.pulpproject.org/en/3.0/nightly/contributing/platform_api/exceptions.html#pulp.exceptions.base.PulpException * Non fatal exceptions can be recorded with the <code>append_non_fatal_error()</code> and it should link them to "that part of the plugin API docs":http://docs.pulpproject.org/en/3.0/nightly/contributing/plugin_api/index.html#pulp.plugin.tasking.Task * These non-fatal exceptions will be returned with the task details through the API. [0]: https://docs.python.org/3/library/exceptions.html