Skip to content

chore: handle 429 #34

Description

@lukepolo

Hi! 👋

Firstly, thanks for your work on this project! 🙂

Today I used patch-package to patch steam-web@0.4.0 for the project I'm working on.

Here is the diff that solved my problem:

diff --git a/node_modules/steam-web/lib/steam.js b/node_modules/steam-web/lib/steam.js
index 902c920..12e1ee4 100755
--- a/node_modules/steam-web/lib/steam.js
+++ b/node_modules/steam-web/lib/steam.js
@@ -464,6 +464,9 @@ steam.prototype.makeRequest = function(obj) {
       } else if (statusCode == 403) {
         callback('403 Error: Check your API key is correct');
         return;
+      } else if(statusCode == 429) {
+        callback('429 Error: Too many requests to the steam API');
+        return;
       }
 
       if (format == 'json') {

This issue body was partially generated by patch-package.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions