evernote.edam.userstore.UserStore.Client: HTTP Status 400 - python-3.x

My python app (evernote-sdk-python3) worked fine until June, 3rd. Suddenly it breaks e.g. when I call "client.get_user_store()" or "client.get_note_store()". All calls to "evernote.edam.userstore.UserStore.Client" respond with HTTP status 400 (The server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing)). I tried it in a sandbox and on the production server and I renewed the auth token. Nothing helped. Something on evernote's side must have changed. My app worked perfectly before.

the Evernote python3 SDK just got a patch, please grab the latest and try again

Related

Api is working fine with postman but not working in react

Nodejs api is working fine with postman but while i'm trying it with react i'm getting some errors like message: "Request aborted", name: "AxiosError", code: "ECONNABORTED"
I haven't added the authentication yet in my api so that is not needed i guess.
I tried to send it in various ways even i tried to handle preflight problem of cors but not sure if i handled that or not! the api is working with postman absolutely ok response as expected.
make sure you don't pass credentials query params in you get request. if you have added credentials in your get request replace your http method with post.

Twilio Studio Flow HTTP Request Failed with Status code 500

I am working with Twilio Flow to create a WhatsApp Chat bot.
This bot allows user to start chat and respond with specific terms or numbers to proceed. It works fine, now I have added "Make HTTP Request" WIDGET to call an URL for posting the data received in response to DB.
When the HTTP Request is made, it returns FAIL & SUCCESS for some reasons,
On checking logs, i found out that a URL when any parameter is without any space or any special character, HTTP request gets success with Response code 200, but when its more than a word with added space or any special character HTTP request is failed and returned with Response code 500.
HTTP Request URL :
https://websiteurl.com/page.php?whatsapp_number={{contact.channel.address}}&message={{widgets.ReplyReceived5.inbound.Body}}
I also tried to make HTTP Request to https://webhook.site, but it also failed.
Added SUCCESS and FAILED Request Screenshot below.
Any help to fix this?
Image of HTTP Request getting SUCCESS with response code 200, Message parameter in URL without any space or special character
Image of HTTP Request FAILED with response code 500, Message parameter in URL with space
Twilio developer evangelist here.
In Studio, you can use HTTP Params and GET which will do the encoding (to handle spaces) for you. Or, you could use Liquid Filtering like {{ widgets.boop.di.doop | url_encode }}. My amazing coworker and Studio wizard Craig Dennis recommends using HTTP params.
Let me know if this helps at all!

Axios Interceptors Prevent Error logging into console

Using interceptors for the first time to refresh an expired JSON Web Token. The response interceptor I implemented works successfully in refreshing the token every time, but still logs the error I throw at the server end from the jwt.verify. (I see 403 forbidden each time before token refreshes).
If I'm doing it correctly on the server end and in the client end, should this error even be logging in the browser? I don't want this error to be logging into console. Now I'm thinking I have to refresh the token before it even expires and not even use interceptors.
check the order of responses from the server. Judging by the description, you are not waiting for the generation of a new token. If in JS terms check async/ await sequence

Strange get request in node.js express

My express server send this request, but I don't know which file send it and why it response with 404. Please help me track this down:
GET /sw-import.js?baseURI=http%3A%2F%2Flocalhost%3A3000%2Fbower_components%2Fplatinum-sw%2Fplatinum-sw-register.html&clientsClaim=true&defaultCacheStrategy=networkFirst&importscript=http%3A%2F%2Flocalhost%3A3000%2Fbower_components%2Fplatinum-sw%2Fbootstrap%2Fsw-toolbox-setup.js&importscriptLate=http%3A%2F%2Flocalhost%3A3000%2Fbower_components%2Fplatinum-sw%2Fbootstrap%2Fsw-toolbox-setup.js&precache=&skipWaiting=true&version=1.0 404 6.503 ms - 255
The request means service worker is registered in the scope http://localhost:3000/
You can verify whether it's running by entering chrome://inspect/#service-workers or see the registration using chrome://serviceworker-internals

Socket.io + Express CORS Error on localhost (not allowed by Access-Control-Allow-Origin)

I have a working node.js Express server to which I would to add socket.io support (allow javascript clients to connect via socket.io). I can connect to the express server via a Javascript $.get(), but the socket.io.connect() command fails due to a CORS error.
My testing machine is OSX with Apache to serve the client, thus port 80 is taken, so I have node.js/express running on port 8888. I added socket.io per the documentation:
var exp = express();
var server = require('http').createServer(api.server);
exp.listen(8888);
var io = require('socket.io').listen(server);
io.sockets.on('connection', function(socket) {
console.log('connection');
});
I properly see "info: socket.io started" in my node.js logs.
Then, on the client, I attempt to connect to the server...
this.socket = io.connect('http://localhost:8888');
this.socket.on('connect',function() {
socket.emit('install','test');
});
However, I'm getting a CORS error in the console in Chrome:
XMLHttpRequest cannot load http://localhost:8888/socket.io/1/?t=1358715637192. Origin http://localhost is not allowed by Access-Control-Allow-Origin.
HOWEVER, THIS works fine!
$.get('http://localhost:8888',function(e,d){
console.log(e,d);
});
So I double checked my headers, for both localhost:8888 and localhost -- both are properly returning the headers which (should) allow for the cross-domain requests...
Access-Control-Allow-Origin: *
Any ideas?
CORS is a very tricking thing to get working (or at least it was for me). I recommend this resource here: http://enable-cors.org/
Following what they do very carefully helped me. I also found that different browsers gave different visibility over the CORS request/responses which helped.
I found that Chrome was easier to get working than firefox, but firefoxes tools such as firebug, were quite nice to work with.
My gut feel from your information is that you might need your request to have an X-Request-With in your request attributes.
I also found using fidler to send the http requests allowed me to narrow my problems down to the server side initially and get that working. You will find browser enforce CORS, but something like fidler doesn't and thus provides another way of inspecting what is happening.
I definately recommend trying to break the problem in half so that you can see if it is server side or client side that is not behaving how you expect.
My problem was related to returning the same CORS response for the OPTIONS header as the POST or GET. That was wrong. Chrome allowed it. Firefox didnt. Any options request that is sent out will be sent out once, then in the future it will be cached and not resent (Which caused alot of confusion for me initially). For the options request you just need a standard response saying its ok to proceed, then in the post or get response i believe you want your cors responses there only.

Resources