When the library encounters an error it will always throw an exception. Your code must catch the exceptions listed below.
Gotify\Exception\GotifyExceptionThrown when the Gotify library experiences an error.
Example: Gotify\Server will throw GotifyException if the given server URI is invalid.
Gotify\Exception\EndpointExceptionThrown when a Gotify API endpoint returns an error.