Skip to content
This repository was archived by the owner on Dec 15, 2022. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/Services/Cache.vala
Original file line number Diff line number Diff line change
Expand Up @@ -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");
}

Expand Down
7 changes: 1 addition & 6 deletions src/Services/Network.vala
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand All @@ -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);
Expand Down