`error` in Pony is for partial functions.
A partial function is where you can't compute a result based on the input.
If you need to know what went wrong (because more than one thing might have gone wrong and that needs to be communicated), you can use a union type for the result and match accordingly (as you would in Rust as an example).