You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
await axios.get(`https://collectionapi.metmuseum.org/public/collection/v1/objects/181640`).then(res => res.data).catch(e => console.log('what is e', e.message, e.request.path));
what is e Request failed with status code 404 /public/collection/v1/objects/181640
Edit: I'm looking at the objectIds array and am seeing how there are missing objectids intentionally. What's the point of the total property if you can just use the .length property on the objectIds array?
The text was updated successfully, but these errors were encountered:
I was doing random number generation as follows: Math.floor(Math.random() * res.total) + 1) To get a random object id to pull from the api but I see now that's the reason why you provide an array with all the objectids so someone can pull a value from the array of objectids instead.
Edit: I'm looking at the objectIds array and am seeing how there are missing objectids intentionally. What's the point of the
total
property if you can just use the.length
property on theobjectIds
array?The text was updated successfully, but these errors were encountered: