-
-
Notifications
You must be signed in to change notification settings - Fork 4.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix for PublicApiRouter.js #4538
Comments
Do you mean this line https://github.com/parse-community/parse-server/blob/master/src/Routers/PublicAPIRouter.js#L159? Do you want to submit a Pull Request? |
So the only suggested change here is to the current line: const params = qs.stringify({username: username, token: token, id: config.applicationId, error:err, app:config.appName}); by passing @Macifier your issue is a need for customization right? Can you detail exactly what the existing problem is with the current passing of err? It is an object, but it should be encoded in the url string, or is just ending up completely blank as you mentioned? |
it is ending up blank yes thats the line i have tested it locally but if we modify it to err.message then it works fine |
I would be nice to keep the entire error object, or most of it. The error code would also be useful for example. It sounds like the object just needs to be prepped to stringify, surprised it isn't just automatically encoded with the rest of the params. @Macifier do you think you could put something together to that extend? If you can put up a PR that would be quite helpful. I'm running around at the moment and won't be able to make the change anytime soon myself. |
@paulovitin I'm fantastic at getting back to notifications on time! 🤣 (extreme sarcasm...) Sorry about the wait. |
ping @paulovitin? |
You mentioned you wanted to help :P that would be nice indeed! |
Sure... i will look until the end of this week.. Sorry haha |
No rush! it's been sitting there for a while and I came by it :) |
Guys, I believe this no make sense. The error object, is a If you try: var query = qs.stringify({ error: new Parse.Error(10, 'Test')});
// returns error%5Bmessage%5D=Teste&error%5Bcode%5D=10
var json = qs.parse(query);
// returns { error: { message: 'Teste', code: '10' } } If the problem is native errors, like @Macifier would you have any logs? |
Closing via #5332 |
please modify 172 line of PublicApiRouter.js to
var params = _querystring2.default.stringify({ username: username, token: token, id: config.applicationId, error: err.message, app: config.appName });
because you are sending error object to choose_password params url so it is getting error as empty if you send err.message atleast we can display error on choose_password if it doesn't match password criteria
The text was updated successfully, but these errors were encountered: