summaryrefslogtreecommitdiff
path: root/src/SMAPI.Web/Framework/Clients/Pastebin
diff options
context:
space:
mode:
authorJesse Plamondon-Willard <Pathoschild@users.noreply.github.com>2019-11-27 21:49:36 -0500
committerJesse Plamondon-Willard <Pathoschild@users.noreply.github.com>2019-11-27 21:49:36 -0500
commitb1400bcb684c43790dd38628b6c131e9e7c4d400 (patch)
tree4b7ddf46d81a76d535ac8995ac4e1120f2432677 /src/SMAPI.Web/Framework/Clients/Pastebin
parent0223382ca8e267d730629ee69cdf1cff673c8573 (diff)
downloadSMAPI-b1400bcb684c43790dd38628b6c131e9e7c4d400.tar.gz
SMAPI-b1400bcb684c43790dd38628b6c131e9e7c4d400.tar.bz2
SMAPI-b1400bcb684c43790dd38628b6c131e9e7c4d400.zip
fallback to Amazon S3 if saving a log to Pastebin fails
Diffstat (limited to 'src/SMAPI.Web/Framework/Clients/Pastebin')
-rw-r--r--src/SMAPI.Web/Framework/Clients/Pastebin/PasteInfo.cs10
-rw-r--r--src/SMAPI.Web/Framework/Clients/Pastebin/PastebinClient.cs2
2 files changed, 10 insertions, 2 deletions
diff --git a/src/SMAPI.Web/Framework/Clients/Pastebin/PasteInfo.cs b/src/SMAPI.Web/Framework/Clients/Pastebin/PasteInfo.cs
index 955156eb..bb2de356 100644
--- a/src/SMAPI.Web/Framework/Clients/Pastebin/PasteInfo.cs
+++ b/src/SMAPI.Web/Framework/Clients/Pastebin/PasteInfo.cs
@@ -1,3 +1,5 @@
+using System;
+
namespace StardewModdingAPI.Web.Framework.Clients.Pastebin
{
/// <summary>The response for a get-paste request.</summary>
@@ -9,7 +11,13 @@ namespace StardewModdingAPI.Web.Framework.Clients.Pastebin
/// <summary>The fetched paste content (if <see cref="Success"/> is <c>true</c>).</summary>
public string Content { get; set; }
- /// <summary>The error message (if saving failed).</summary>
+ /// <summary>When the file will no longer be available.</summary>
+ public DateTime? Expiry { get; set; }
+
+ /// <summary>The error message if saving succeeded, but a non-blocking issue was encountered.</summary>
+ public string Warning { get; set; }
+
+ /// <summary>The error message if saving failed.</summary>
public string Error { get; set; }
}
}
diff --git a/src/SMAPI.Web/Framework/Clients/Pastebin/PastebinClient.cs b/src/SMAPI.Web/Framework/Clients/Pastebin/PastebinClient.cs
index 2e8a8c68..d695aab6 100644
--- a/src/SMAPI.Web/Framework/Clients/Pastebin/PastebinClient.cs
+++ b/src/SMAPI.Web/Framework/Clients/Pastebin/PastebinClient.cs
@@ -62,7 +62,7 @@ namespace StardewModdingAPI.Web.Framework.Clients.Pastebin
}
catch (Exception ex)
{
- return new PasteInfo { Error = ex.ToString() };
+ return new PasteInfo { Error = $"Pastebin error: {ex}" };
}
}