When the library encounters an error it will always throw an exception. Your code must catch the exceptions listed below.
Ntfy\Exception\NtfyException
Thrown when the ntfy library experiences an error.
Example: Ntfy\Server
will throw NtfyException
if the given server URI is invalid.
Ntfy\Exception\EndpointException
Thrown when the ntfy server returns an error.