faker-js / faker

Generate massive amounts of fake data in the browser and node.js
https://fakerjs.dev
Other
12.84k stars 915 forks source link

Failed to load resource: the server responded with a status of 429 #1868

Closed kydner closed 1 year ago

kydner commented 1 year ago

Pre-Checks

Describe the bug

i used faker image, but always error 429 when i reload browser, how handle this error?

Minimal reproduction code

No response

Additional Context

No response

Environment Info

npmPackageFaker: image

Which module system do you use?

Used Package Manager

yarn

ST-DDT commented 1 year ago

i used faker image, but always error 429 when i reload browser, how handle this error?

Please paste the entire error here message here. Did the image module return an url that was invalid or couldn't you generate an url?

kydner commented 1 year ago
  1. Request URL:

    https://cloudflare-ipfs.com/ipfs/Qmd3W5DuhgHirLHGVixi6V76LhCkZUz6pnFt5AJBiyvHye/avatar/36.jpg

  2. Request Method: GET
  3. Status Code: 429
  4. Remote Address: 104.17.96.13:443
  5. Referrer Policy: strict-origin-when-cross-origin

On Wed, Feb 22, 2023 at 6:23 AM ST-DDT @.***> wrote:

i used faker image, but always error 429 when i reload browser, how handle this error?

Please paste the entire error here message here. Did the image module return an url that was invalid or couldn't you generate an url?

— Reply to this email directly, view it on GitHub https://github.com/faker-js/faker/issues/1868#issuecomment-1439221171, or unsubscribe https://github.com/notifications/unsubscribe-auth/AJVU3ZRZLNMDIGU4HD4JFALWYVE55ANCNFSM6AAAAAAVDTPV34 . You are receiving this because you authored the thread.Message ID: @.***>

kydner commented 1 year ago

On first load is error 429 but, when reload again on same url success

Shinigami92 commented 1 year ago

429 Too Many Requests https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/429

This is not related to Faker itself but that you are doing to many requests from your client to this provider Faker "just" concatenates a string that is at the end an URL that the user who use Faker can then call.


BUT! I see you are using these for avatars and so I assume you need it the same as I need it for my project to mock some faces. We were talking already about how we could provide some alternatives for this and e.g. wanted to have a provider that provides AI generated non real world person faces. But a paid or non-deterministic provider is not an option.

A second alternative might be to create a repo under @faker-js org and upload images there. This would bring maintenance burden and also we might run into legal issues if we don't care to much about the data as then they are in our responsibility were as the current set is not that much but was "gifted" to us as a present (https://github.com/faker-js/faker/pull/95#issuecomment-1010609280)

ST-DDT commented 1 year ago

The original issue is outside of our control so I consider this as nothing to do for us here except documentation which is covered by https://github.com/faker-js/faker/issues/1783.