Skip to content

Commit 1647393

Browse files
Return original manifest if update manifest failed
1 parent a8543d5 commit 1647393

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

Sources/App/Controllers/InstallController.swift

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -50,11 +50,7 @@ struct InstallController: RouteCollection {
5050

5151
// modify manifest body to update asset URL
5252
guard let updatedBody = updatedManifestBody(from: body, logger: req.logger) else {
53-
throw Abort(
54-
.internalServerError,
55-
headers: manifestResponse.headers,
56-
reason: "Failed to update manifest.",
57-
identifier: manifestURLString)
53+
return manifestResponse
5854
}
5955

6056
manifestResponse.body = updatedBody
@@ -123,7 +119,7 @@ struct InstallController: RouteCollection {
123119
newBuffer.writeBytes(newData)
124120
return newBuffer
125121
} catch {
126-
logger.error("Manifest plist modification failed: \(error.localizedDescription)")
122+
logger.error("Manifest plist modification failed: \(error.localizedDescription). \nRaw error: \(error)")
127123
return nil
128124
}
129125
}

0 commit comments

Comments
 (0)