Union types are valuable when you have a field that can return one of several types.
- errorsAsData shows how to implement the "errors as data" pattern. This is useful when you want to return a field that can return either a value or an error.
Union types are valuable when you have a field that can return one of several types.