wasmCloud / wash

WAsmcloud SHell - the comprehensive command-line tool for wasmCloud development
https://wasmcloud.com
Apache License 2.0
149 stars 58 forks source link

refactor: `Err(anyhow!(...))` -> `bail!`, err msg capitals #939

Closed vados-cosmonic closed 8 months ago

vados-cosmonic commented 8 months ago

Feature or Problem

return Err(anyhow!(...)) has been used all over the codebase over time, and can be comfortably converted to anyhow::bail!, which is easier to read and usually takes less space.

In addition, for passing errors through layers of Rust code/libs, capitals should be avoided in error messages as the later messages may be wrapped (and may not be the start of the sentence), which is also done periodically through out the codebase.

This commit converts the usages of the patterns above to be more consistent over time

Related Issues

Release Information

Consumer Impact

Testing

Built on platform(s)

Tested on platform(s)

Unit Test(s)

Acceptance or Integration

Manual Verification