resolveArray tend to cause rate limit error #43
-
Hi, based on my observation and testing, if I refresh my app quickly, one of my functions that uses resolveArray will cause the rate limit issue. If I removed it, the app is working fine when I refresh my app. const customList = await MFA.List.get(
"xxxxxxxxx",
true
);
const customListManga = await MFA.resolveArray(customList.manga); //Rate limit error If I change to this way, it doesn't throw any rate limit error const customList = await MFA.List.get(
"xxxxxxxxx",
true
);
const customListManga = = await MFA.Manga.getMultiple(
customList.manga.map((manga) => manga.id)
); Not sure this is a bug or not, but I think it is worth checking. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
The As of now Groups and Lists do not support |
Beta Was this translation helpful? Give feedback.
The
resolveArray
function usesPromise.all
to resolve all elements from the array, but that also means each request happens concurrently, breaking the rate limit. This is an oversight on my part and I will make it request in a series likegetMultiple
does.As of now Groups and Lists do not support
includeSubObjects
in practice since the query parameter is allowed by MD but it does nothing (thus the second code block you wrote has the same performance as the first). However, the next version of the official API will add support for this on July 21st, so there will be a new release around then that fixes this issue and allows for the increased performance ofincludeSubObjects
.