Add API + tests for Swarm

Remove the `Error: ` from the string. The output will be `ValueError: ....`