From 858ee78fbebe161a4cdd707a469dc0f045211a51 Mon Sep 17 00:00:00 2001 From: Max Harmathy Date: Wed, 25 Aug 2021 13:05:58 +0200 Subject: [PATCH] Use reason_phrase instead of get_phrase --- src/Services/Cache.vala | 2 +- src/Services/Network.vala | 7 +------ 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/src/Services/Cache.vala b/src/Services/Cache.vala index 2251697..2ed314e 100644 --- a/src/Services/Cache.vala +++ b/src/Services/Cache.vala @@ -88,7 +88,7 @@ public class Tootle.Cache : GLib.Object { try { var code = msg.status_code; if (code != Soup.Status.OK) { - var error = network.describe_error (code); + var error = msg.reason_phrase; throw new Oopsie.INSTANCE (@"Server returned $error"); } diff --git a/src/Services/Network.vala b/src/Services/Network.vala index fa2839c..d0143b0 100644 --- a/src/Services/Network.vala +++ b/src/Services/Network.vala @@ -56,7 +56,7 @@ public class Tootle.Network : GLib.Object { else if (status == Soup.Status.CANCELLED) debug ("Message is cancelled. Ignoring callback invocation."); else - ecb ((int32) status, describe_error ((int32) status)); + ecb ((int32) status, msg.reason_phrase); }); } catch (Error e) { @@ -65,11 +65,6 @@ public class Tootle.Network : GLib.Object { } } - public string describe_error (uint code) { - var reason = Soup.Status.get_phrase (code); - return @"$code: $reason"; - } - public void on_error (int32 code, string message) { warning (message); app.toast (message); author'>author
path: root/tests/hackage.scm
AgeCommit message (Expand)Author
2023-12-03guix: import: Fix parsing Cabal files that import many stanzas...Saku Laesvuori
2023-12-03guix: import: Parse cabal layout blocks correctly...Saku Laesvuori
2023-02-26import: hackage: Add upstream-name property....Lars-Dominik Braun
2022-06-06import: hackage: Filter upper/mixed case dependencies too....Lars-Dominik Braun
2022-06-06import: hackage: Filter internal libraries from inputs and native-inputs....Lars-Dominik Braun
2022-06-06import: cabal: Support library names...Lars-Dominik Braun
2022-06-06import: cabal: Document failing syntax through tests....Lars-Dominik Braun
2022-06-06import: cabal: Allow curly bracket before else statement....Lars-Dominik Braun
2022-06-06import: cabal: Allow properties without space between key and value....Lars-Dominik Braun
2022-06-06import: cabal: Allow curly brackets in more positions....Lars-Dominik Braun
2022-06-06import: cabal: Support elif statement....Lars-Dominik Braun
2021-12-05Merge remote-tracking branch 'origin/master' into core-updates-frozenRicardo Wurmus
2021-12-01build-system: haskell: Add ‘hackage-uri’ procedure....Xinglu Chen
2021-09-17Merge branch 'master' into core-updates-frozen...Marius Bakke
2021-09-15import: cabal: Treat identifier names correctly....Xinglu Chen
2021-07-20import: hackage: Emit new-style package inputs....Sarah Morgensen
2021-06-25import: hackage: Support "common" field and imports...Philip Munksgaard
2021-05-22import: hackage: Prefix licenses with 'license:'....Xinglu Chen