Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions Source/JamfProClient.swift
Original file line number Diff line number Diff line change
Expand Up @@ -80,11 +80,14 @@ struct JamfProClient {
sendRequest(endpoint: "osxconfigurationprofiles", data: xml.xmlData) { (statusCode, resultData) in
let success: Bool = (200 <= statusCode && statusCode <= 299)
if !success {
var errMessage = ""
if let text = String(data: resultData, encoding: .utf8) {
print("Error (\(statusCode)):\n\(text)")
errMessage = "Error (\(statusCode)):\n\(text)"
} else {
print("Unknown error: \(statusCode)")
errMessage = "Unknown error: \(statusCode)"
}
print(errMessage)
Alert().display(header: "Upload failed", message: errMessage)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Alert().display(header: "Upload failed", message: errMessage)
Alert().display(header: "Upload failed:", message: errMessage)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think we want a colon at the end of the header. The header describes the situation on one line, and then the message gives more detail, and the message already has a colon, so it would look strange to have two colons.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just saw that there is a colon in other messages for example "Attention:".

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah dang, I didn't notice it there.

}
completionBlock(success)
}
Expand Down