Account API returns incomplete information

Very sporadically – maybe a couple of times out of dozens of attempts – the API endpoint at “/api/user/v1/accounts/{username}” (“LMS APIs — edx-platform documentation”) only returns partial information.

We caught this because our code assumes that there will be an “id” in the returned JSON, and sometimes it’s not there. The JSON returned from the API is supposed to have the following keys:

‘account_privacy’, ‘profile_image’, ‘username’, ‘bio’, ‘course_certificates’, ‘country’, ‘date_joined’, ‘language_proficiencies’, ‘level_of_education’, ‘social_links’, ‘time_zone’, ‘accomplishments_shared’, ‘name’, ‘email’, ‘id’, ‘verified_name’, ‘extended_profile’, ‘gender’, ‘state’, ‘goals’, ‘is_active’, ‘last_login’, ‘mailing_address’, ‘requires_parental_consent’, ‘secondary_email’, ‘secondary_email_enabled’, ‘year_of_birth’, ‘phone_number’, ‘activation_key’, ‘pending_name_change’

but occasionally we only get the first three. We get ‘accout_privacy’, ‘profile_image’ (including URLs for “full”, “large”, “medium”, and “small” images), and “username”. And that’s the end.

Later, when I try pulling information for the same user, everything comes back as it should.

Has anyone here seen behavior like this before?