Shields: Packagist badge occasionally shows "internal error"

Created on 10 Jul 2019  路  11Comments  路  Source: badges/shields

Are you experiencing an issue with...

  • [x] [shields.io](https://shields.io/#/)
  • [ ] My own instance
  • [ ] [gh-badges NPM package](https://www.npmjs.com/package/gh-badges)

:beetle: Description

Badge shows "internal error":
Packagist: https://packagist.org/packages/avtocod/b2b-api-php

:link: Link to the badge

https://img.shields.io/packagist/v/avtocod/b2b-api-php.svg

bug

All 11 comments

I'm seeing this intermittently in production - sometimes it works and sometimes it doesn't. e.g:


Screenshot at 2019-07-10 18-36-23


and I can't reproduce it locally.

I wonder if there is an intermittent issue with the upstream API?

Could it be an hourly rate limit or something like that? Some of @RedSparr0w's status tooling was really helpful when tracking down similar issues with the Code Climate service.

I'd have thought upstream issues with the API (accessibility, rate limiting, etc.) would result in a different error message though, like inaccessible. The internal error message makes me suspect that there's probably something we've got going on our side as well, even if that's being triggered by an upstream issue.

What happens when the response doesn't match the schema,
Does it produce this error message?

https://github.com/badges/shields/blob/a9d0f0d32342c50d3978fc32921628565ef9c6c8/services/packagist/packagist-version.service.js#L12-L26

I feel this problem is _probably_ caused by an unexpected response from packagist.
But hard to tell without seeing the error messages :sweat_smile:

Edit: I thought we had a way to view the error messages now?, Just don't remember how..

What happens when the response doesn't match the schema,
Does it produce this error message?

Schema validation errors are invalid response data message. I can confirm that earlier today (when the issue was originally opened) the badge message was defintely internal error

I thought we had a way to view the error messages now?, Just don't remember how..

I believe errors are viewable in Sentry, but I don't have access

Thanks, looks like we may need @paulmelnikow to have a look into this,
Hopefully it's simple enough to find based on which service threw the error?
https://github.com/badges/shields/blob/9b3db0774b0444623d1ed7de9d1eca21bf9db2df/doc/production-hosting.md#L25

There's nothing in Sentry. I don't think we log "unhandled" internal errors to sentry, though it makes sense to add that!

One possible bug from reading the code: what happens if you call latest([])? I'm not sure the schema forbids an empty versions object.

Now all looks fine!

Suppose we could close this, and turn on logging for these errors, which would make it a bit easier to spot the actual problem next time 馃槈

I opened #3688.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

sinedied picture sinedied  路  28Comments

calebcartwright picture calebcartwright  路  37Comments

AlexWayfer picture AlexWayfer  路  40Comments

paulmelnikow picture paulmelnikow  路  40Comments

tooomm picture tooomm  路  32Comments