Improve Pennyworth error handling

Use parts of the error handling of machinery, to handle Cheetah errors
properly.