Skip to content

Commit

Permalink
added 404 check before parsing info(enhancement from badges#888, upda…
Browse files Browse the repository at this point in the history
…ted url in try.html
  • Loading branch information
eddiewebb committed Nov 14, 2018
1 parent 9f2715c commit f8f7f07
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
5 changes: 5 additions & 0 deletions server.js
Original file line number Diff line number Diff line change
Expand Up @@ -5120,6 +5120,11 @@ cache(function(data, match, sendBadge, request) {
return;
}
try {
if (res.statusCode == 404) {
badgeData.text[1] = path + ' not found';
sendBadge(format, badgeData);
return;
}
var data = JSON.parse(buffer);
var latest_status = data.results[0].status;
if (latest_status == 10) {
Expand Down
4 changes: 2 additions & 2 deletions try.html
Original file line number Diff line number Diff line change
Expand Up @@ -856,8 +856,8 @@ <h3 id="miscellaneous"> Miscellaneous </h3>
<td><code>https://img.shields.io/docker/automated/jrottenberg/ffmpeg.svg</code></td>
</tr>
<tr><th data-keywords='docker build status'> Docker Build Status </th>
<td><img src='/docker/status/jrottenberg/ffmpeg.svg' alt=''/></td>
<td><code>https://img.shields.io/docker/status/jrottenberg/ffmpeg.svg</code></td>
<td><img src='/docker/build/jrottenberg/ffmpeg.svg' alt=''/></td>
<td><code>https://img.shields.io/docker/build/jrottenberg/ffmpeg.svg</code></td>
</tr>
<tr><th data-keywords='imagelayers'> ImageLayers Size: </th>
<td><img src='/imagelayers/image-size/_/ubuntu/latest.svg' alt=''/></td>
Expand Down

0 comments on commit f8f7f07

Please sign in to comment.