Skip to content
Snippets Groups Projects
Commit a34e2102 authored by richard.petersen's avatar richard.petersen :sailboat: Committed by richard.petersen
Browse files

Add additional logging

parent 6b395a3a
No related branches found
No related tags found
No related merge requests found
...@@ -38,7 +38,11 @@ export async function fetchFileWithHeadersFromBaseUrl (path, baseUrl, version) { ...@@ -38,7 +38,11 @@ export async function fetchFileWithHeadersFromBaseUrl (path, baseUrl, version) {
isJSFile(path) && getCSSDependenciesFor({ file: path.substr(1), version }) isJSFile(path) && getCSSDependenciesFor({ file: path.substr(1), version })
]) ])
if (!response.ok) throw new NotFoundError(`Error fetching file: ${path}`) if (!response.ok) {
if (response.status === 404) logger.trace(`[Files] "${path}" could not be found on "${baseUrl}". Responded with: ${response.status}`)
else logger.error(`[Files] Unexpected result from file retrieval "${path}" on "${baseUrl}", responded with: ${response.status}`)
throw new NotFoundError(`Error fetching file: ${path}`)
}
const result = { const result = {
body: await createFileBuffer(response, dependencies), body: await createFileBuffer(response, dependencies),
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment