Skip to content

chore: handle 429 #34

@lukepolo

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.

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