Type assertion function to ensure a result is Err. Throws an error if the result is Ok.
The result to check
If the result is Ok
Type assertion function to ensure a result is Err. Throws an error if the result is Ok.