Previously, when we were retrieving files from github, we ran into 404s under 2 conditions:
file didn't exist previously (in master) but did now (in staging)
file existed previously (in master) but doesn't now (in staging).
because we rely on a GET request to github for both of staging/master, under either 1 of the above conditions, we will get a 404 which will in turn translate into a 500 on our end.
Solution
This fixes the issue by adding a default empty string return when it is a 404 error
the case where the file didn't exist previously + didn't exist now means that it won't be raised for comparison anyway.
Problem
Previously, when we were retrieving files from github, we ran into 404s under 2 conditions:
master
) but did now (instaging
)master
) but doesn't now (instaging
).because we rely on a
GET
request to github for both ofstaging/master
, under either 1 of the above conditions, we will get a 404 which will in turn translate into a 500 on our end.Solution