Merge "Introduce UploadStashFile hook, improve API handling of stash errors"