Better Sentry messages
This commit is contained in:
parent
5027660b52
commit
ae7962ae50
|
@ -153,7 +153,7 @@ class MastodonCachePersistentStore: NSPersistentCloudKitContainer {
|
||||||
loadPersistentStores { (description, error) in
|
loadPersistentStores { (description, error) in
|
||||||
if let error = error {
|
if let error = error {
|
||||||
logger.error("Unable to load persistent store: \(String(describing: error), privacy: .public)")
|
logger.error("Unable to load persistent store: \(String(describing: error), privacy: .public)")
|
||||||
fatalError("Unable to load persistent store")
|
fatalError("Unable to load persistent store: \(String(describing: error))")
|
||||||
}
|
}
|
||||||
|
|
||||||
if description.configuration == "Cloud" {
|
if description.configuration == "Cloud" {
|
||||||
|
|
|
@ -59,6 +59,7 @@ extension ToastConfiguration {
|
||||||
switch error.type {
|
switch error.type {
|
||||||
case .invalidRequest, .invalidResponse, .invalidModel(_), .mastodonError(_):
|
case .invalidRequest, .invalidResponse, .invalidModel(_), .mastodonError(_):
|
||||||
SentrySDK.capture(error: error) { scope in
|
SentrySDK.capture(error: error) { scope in
|
||||||
|
scope.setFingerprint([String(describing: error)])
|
||||||
let crumb = Breadcrumb(level: .error, category: "error")
|
let crumb = Breadcrumb(level: .error, category: "error")
|
||||||
crumb.message = title
|
crumb.message = title
|
||||||
crumb.data = [
|
crumb.data = [
|
||||||
|
|
Loading…
Reference in New Issue