error[E0277]: CustomError is not a `Result` or aliased `Result`. Server functions must return a `Result` or aliased `Result`.
  --> tests/invalid/not_result.rs:25:1
   |
25 | #[server]
   | ^^^^^^^^^ Must return a `Result` or aliased `Result`.
   |
   = help: the trait `ServerFnMustReturnResult` is not implemented for `CustomError`
   = note: If you are trying to return an alias of `Result`, you must also implement `FromServerFnError` for the error type.
   = help: the trait `ServerFnMustReturnResult` is implemented for `Result<T, E>`
   = note: this error originates in the attribute macro `server` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0277]: CustomError is not a `Result` or aliased `Result`. Server functions must return a `Result` or aliased `Result`.
  --> tests/invalid/not_result.rs:25:1
   |
25 | #[server]
   | ^^^^^^^^^ Must return a `Result` or aliased `Result`.
   |
   = help: the trait `ServerFnMustReturnResult` is not implemented for `CustomError`
   = note: If you are trying to return an alias of `Result`, you must also implement `FromServerFnError` for the error type.
   = help: the trait `ServerFnMustReturnResult` is implemented for `Result<T, E>`

error[E0271]: expected `impl Future<Output = CustomError>` to be a future that resolves to `Result<_, _>`, but it resolves to `CustomError`
  --> tests/invalid/not_result.rs:25:1
   |
25 | #[server]
   | ^^^^^^^^^ expected `Result<_, _>`, found `CustomError`
   |
   = note: expected enum `Result<_, _>`
              found enum `CustomError`
note: required by a bound in `ServerFn::run_body::{anon_assoc#0}`
  --> src/lib.rs
   |
   |     ) -> impl Future<Output = Result<Self::Output, Self::Error>> + Send;
   |                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `ServerFn::run_body::{anon_assoc#0}`

error[E0277]: CustomError is not a `Result` or aliased `Result`. Server functions must return a `Result` or aliased `Result`.
  --> tests/invalid/not_result.rs:25:1
   |
25 | #[server]
   | ^^^^^^^^^ Must return a `Result` or aliased `Result`.
   |
   = help: the trait `ServerFnMustReturnResult` is not implemented for `CustomError`
   = note: If you are trying to return an alias of `Result`, you must also implement `FromServerFnError` for the error type.
   = help: the trait `ServerFnMustReturnResult` is implemented for `Result<T, E>`

error[E0308]: mismatched types
  --> tests/invalid/not_result.rs:25:1
   |
25 | #[server]
   | ^^^^^^^^^ expected `CustomError`, found `Result<_, _>`
   |
   = note: expected enum `CustomError`
              found enum `Result<_, _>`
help: consider using `Result::expect` to unwrap the `Result<_, _>` value, panicking if the value is a `Result::Err`
   |
25 | #[server].expect("REASON")
   |          +++++++++++++++++
