Page MenuHomeDevCentral

1st commit
ClosedPublic

Authored by inidal on Feb 1 2023, 19:09.
Tags
None
Referenced Files
Unknown Object (File)
Tue, Dec 17, 09:57
Unknown Object (File)
Mon, Dec 16, 17:30
Unknown Object (File)
Fri, Dec 13, 04:05
Unknown Object (File)
Fri, Dec 13, 02:07
Unknown Object (File)
Thu, Dec 12, 16:43
Unknown Object (File)
Tue, Dec 10, 01:07
Unknown Object (File)
Mon, Dec 9, 22:02
Unknown Object (File)
Sat, Dec 7, 08:15

Diff Detail

Repository
rNPUSH notification-push
Lint
No Lint Coverage
Unit
No Test Coverage
Branch
master
Build Status
Buildable 4447
Build 4714: arc lint + arc unit

Event Timeline

inidal requested review of this revision.Feb 1 2023, 19:09
inidal created this revision.
dereckson added inline comments.
src/main.rs
55

There is a last check we can do.

If it worked, we receive a response with HTTP code 200.
If there is any failure, the server can send a 500 (e.g. if RabbitMQ is down).

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.

Prototype OK.

Style issues are handled in up-to-come D2903.

This revision is now accepted and ready to land.Mar 20 2023, 21:20
This revision was automatically updated to reflect the committed changes.
inidal marked an inline comment as done.