+ 2

throw'er error 287

I'm getting a throw'er error 287 in the command line when sending a respond using api, please help.

22nd May 2020, 9:52 PM
Moshie Seidenfeld
Moshie Seidenfeld - avatar
10 Antworten
+ 3
this seems to be error on the api's side
24th May 2020, 5:20 AM
Prabhakar Dev
Prabhakar Dev - avatar
+ 3
Which api are you using? Are you talking about an http response?
23rd May 2020, 11:25 AM
Prabhakar Dev
Prabhakar Dev - avatar
+ 3
Can you insert the code or a similar working snippet so i can look for errors
24th May 2020, 3:48 AM
Prabhakar Dev
Prabhakar Dev - avatar
+ 2
i guess you should report it to the api provider and try using a different api for now
24th May 2020, 5:22 AM
Prabhakar Dev
Prabhakar Dev - avatar
+ 2
I just search on the net but this error code gave me results only about VBA so i guess it was a problem on server side
24th May 2020, 5:26 AM
Prabhakar Dev
Prabhakar Dev - avatar
0
Yes
24th May 2020, 2:15 AM
Moshie Seidenfeld
Moshie Seidenfeld - avatar
0
var express = require("express"); var bodyParser = require("body-parser"); var request = require("request"); const https = require("https"); const app = express(); app.use(express.static("public")); app.use(bodyParser.urlencoded({extended:true})); app.get("/", function(req, res){ res.sendFile(__dirname + "/signup.html"); }); app.post("/", function(req, res){ var name = req.body.fName; var laName = req.body.lName; var email = req.body.email; var data = { members:[ { email_address:email, status: "subscribed", merge_fields: { FNAME:name, LNAME:laName, }, } ] }; var jsonData = JSON.stringify(data); const url = "https://us18.api.mailchimp.com/3.0/lists/8cddd96f04"; const options = { method: "POST", auth: "moshie:8964e9ee6c6f3379071bf950b2e1c4ca-us18", }; const request = https.request(url, options, function(response){ if (response.statusCode === 200){ res.send("sucess"); } else{ res.send("problem"); } response.on("data", function(data){ console.log(JSON.parse(data)); }); }); request.write(jsonData); request.end(); }); app.listen(3000, function(){ console.log("serving on server 3000"); });
24th May 2020, 4:41 AM
Moshie Seidenfeld
Moshie Seidenfeld - avatar
0
What am I supposed to do?
24th May 2020, 5:21 AM
Moshie Seidenfeld
Moshie Seidenfeld - avatar
0
Thanks!
24th May 2020, 5:23 AM
Moshie Seidenfeld
Moshie Seidenfeld - avatar
0
Any dictionary where I can see error code meanings? for the future
24th May 2020, 5:24 AM
Moshie Seidenfeld
Moshie Seidenfeld - avatar