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