Returning better custom error types