Details
Details
- Reviewers
dereckson - Maniphest Tasks
- T771: Allow to send notifications from the command line
- Commits
- rNPUSH9de15a097588: Add CLI notification functionality
Diff Detail
Diff Detail
- Repository
- rNPUSH notification-push
- Lint
Lint Not Applicable - Unit
Tests Not Applicable
Event Timeline
src/main.rs | ||
---|---|---|
55 | There is a last check we can do. If it worked, we receive a response with HTTP code 200. The reqwest response offers a status method to check if the code is 200/201/204: if !res.status().is_success() { eprintln!("The notifications server can't process the notification."); exit(2); // Let's use another code so a script can know at what step it failed. } We aren't especially interested by the specifics, as the notifications center also logged the error in its own log, and there is nothing the push script or the user using it can do. |