🔊 Add more proper logging for ap failure

This commit is contained in:
2025-12-31 23:06:29 +08:00
parent c11b30d0bb
commit f49f17a9db

View File

@@ -248,7 +248,12 @@ public class ActivityPubActivityHandler(
{ {
var objectValue = activity.GetValueOrDefault("object"); var objectValue = activity.GetValueOrDefault("object");
if (objectValue is not Dictionary<string, object> objectDict) return false; if (objectValue is not Dictionary<string, object> objectDict)
{
logger.LogWarning("Unable undo operation, no object found... {Object}", JsonSerializer.Serialize(activity));
return false;
}
var objectType = objectDict.GetValueOrDefault("type")?.ToString(); var objectType = objectDict.GetValueOrDefault("type")?.ToString();
return objectType switch return objectType switch
{ {