More error reporting tweaks

This commit is contained in:
Shadowfacts 2023-01-15 15:01:16 -05:00
parent c5a25eecf1
commit b1374b12a3
1 changed files with 6 additions and 2 deletions

View File

@ -71,11 +71,15 @@ extension ToastConfiguration {
event.tags!["error_type"] = "invalid_response"
case .invalidModel(let error):
event.tags!["error_type"] = "invalid_model"
event.tags!["underlying_error"] = String(describing: error)
event.extra = [
"underlying_error": String(describing: error)
]
case .mastodonError(let code, let error):
event.tags!["error_type"] = "mastodon_error"
event.tags!["response_code"] = "\(code)"
event.tags!["underlying_error"] = error
event.extra = [
"underlying_error": String(describing: error)
]
default:
break
}