EmergeTools/fastlane-plugin-emerge

Could upload action return an error if upload fails

Closed this issue · 1 comments

Hi,

Currently the upload action swallows any errors and only prints console feedback: https://github.com/EmergeTools/fastlane-plugin-emerge/blob/main/lib/fastlane/plugin/emerge/helper/emerge_helper.rb#L23-L31. This makes it impossible (at least elegantly) to work out if the upload succeeded and perform additional actions.

I'm not failure with how error reporting works in actions, but if possible the upload action really should return some catchable error, so that the caller can optionally respond

Thanks

Hey @itsthejb thanks for reporting this! The action now returns the uploadId on success. It will return false for some validation errors, and throw an exception that you can catch (with a rescue block) for api errors. This is available in v0.10.2