summaryrefslogtreecommitdiff
path: root/Hutch/Views/Pastes/PasteDetailViewModel.swift
diff options
context:
space:
mode:
authorChristian Cleberg <[email protected]>2026-03-19 16:59:16 -0500
committerChristian Cleberg <[email protected]>2026-03-19 16:59:16 -0500
commitb82bbeeea48ad27832a355c2a41408559c411104 (patch)
tree0af45101300c75970471573b09f878a1b3763b38 /Hutch/Views/Pastes/PasteDetailViewModel.swift
parent9065ef6e92245a44390e336cc1ae515ae706cdd7 (diff)
downloadhutch-b82bbeeea48ad27832a355c2a41408559c411104.tar.gz
hutch-b82bbeeea48ad27832a355c2a41408559c411104.tar.bz2
hutch-b82bbeeea48ad27832a355c2a41408559c411104.zip
v2.1: bundled polish and fixes
Diffstat (limited to 'Hutch/Views/Pastes/PasteDetailViewModel.swift')
-rw-r--r--Hutch/Views/Pastes/PasteDetailViewModel.swift8
1 files changed, 4 insertions, 4 deletions
diff --git a/Hutch/Views/Pastes/PasteDetailViewModel.swift b/Hutch/Views/Pastes/PasteDetailViewModel.swift
index 8c60edd..984acf6 100644
--- a/Hutch/Views/Pastes/PasteDetailViewModel.swift
+++ b/Hutch/Views/Pastes/PasteDetailViewModel.swift
@@ -47,7 +47,7 @@ final class PasteDetailViewModel {
}
await loadSelectedFileContentsIfNeeded()
} catch {
- self.error = error.localizedDescription
+ self.error = error.userFacingMessage
}
}
@@ -77,7 +77,7 @@ final class PasteDetailViewModel {
}
return updatedPaste
} catch {
- self.error = error.localizedDescription
+ self.error = error.userFacingMessage
return nil
}
}
@@ -92,7 +92,7 @@ final class PasteDetailViewModel {
_ = try await service.deletePaste(id: pasteID)
return true
} catch {
- self.error = error.localizedDescription
+ self.error = error.userFacingMessage
return false
}
}
@@ -108,7 +108,7 @@ final class PasteDetailViewModel {
do {
fileContents[file.hash] = try await service.loadContents(from: url)
} catch {
- self.error = error.localizedDescription
+ self.error = error.userFacingMessage
}
}
}