Skip to content
This repository has been archived by the owner on Sep 5, 2020. It is now read-only.

improve 'METHOD_DENIED' error message #2127

Merged
merged 5 commits into from
Jul 14, 2017

Conversation

luclu
Copy link
Contributor

@luclu luclu commented Apr 10, 2017

Test via menu -> develop -> run tests.

Also removes unnecessary Window object.

@mention-bot
Copy link

@luclu, thanks! @frozeman, please review this.

@evertonfraga
Copy link
Member

evertonfraga commented Apr 12, 2017

I saw some user log with a possible problem on the error handling. __method__ wasn't replaced.

[2017-04-11 10:11:41.421] [ERROR] ipcProviderBackend - Send request failed { code: -32601, message: 'Method \'__method__\' not allowed.' }

https://gitter.im/ethereum/mist?at=58ec5ffb8fcce56b20edea47


payload.error = this.ERRORS.METHOD_DENIED;
const err = this.ERRORS.METHOD_DENIED;
err.message = err.message.replace(/__method__/, payload.method);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i guess a simple string replace '__method__' would be enough here.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are we sure we are not modifying the original object?

@luclu
Copy link
Contributor Author

luclu commented Jun 30, 2017

Thanks @frozeman!

@frozeman frozeman merged commit 7fae2a8 into develop Jul 14, 2017
@frozeman frozeman deleted the luclu_improve-method-denied-err-msg branch July 14, 2017 11:28
frozeman pushed a commit that referenced this pull request Jul 24, 2017
* improve 'METHOD_DENIED' error message (#2127)

* improve 'METHOD_DENIED' error message

* fix

* upstream fixes

* Swarm additions (#2764)

* fixes batch requests on isolated preloaders

* added 404 page for not found swarm content

* fixed coide climate issues

* show custom 404 error only for bzz://

* Error page fixes and build errors (#2780)

* fixes batch requests on isolated preloaders

* added 404 page for not found swarm content

* fixed coide climate issues

* show custom 404 error only for bzz://

* fixed borwser.js issue and sound and error pages

* trigger travis

* trigger travis

* adding globals to ESLint whitelist

* Small refactor; Fixing 3/4 tests

* Adjusting spectron version

* ESLint

* [Spectron] New fixture server; Fixes 4/4 test.

* Wallet shouldn't start Swarm

* Wallet shouldn't start Swarm

* Adding exception to eslint

* Fix wallet preloader issue

* Mac release path (#2808)

* Adding gitter channel info (#2807)

* Add bzz and .eth to urls (#2792)

* add .eth

* refactor ifs

* solve for wallet.ethereum.org

* Fixing delay problem
evertonfraga added a commit that referenced this pull request Sep 22, 2017
* improve 'METHOD_DENIED' error message (#2127)

* improve 'METHOD_DENIED' error message

* fix

* upstream fixes

* Swarm additions (#2764)

* fixes batch requests on isolated preloaders

* added 404 page for not found swarm content

* fixed coide climate issues

* show custom 404 error only for bzz://

* Error page fixes and build errors (#2780)

* fixes batch requests on isolated preloaders

* added 404 page for not found swarm content

* fixed coide climate issues

* show custom 404 error only for bzz://

* fixed borwser.js issue and sound and error pages

* trigger travis

* trigger travis

* adding globals to ESLint whitelist

* Small refactor; Fixing 3/4 tests

* Adjusting spectron version

* ESLint

* [Spectron] New fixture server; Fixes 4/4 test.

* Wallet shouldn't start Swarm

* Wallet shouldn't start Swarm

* Adding exception to eslint

* Fix wallet preloader issue

* Mac release path (#2808)

* Adding gitter channel info (#2807)

* Add bzz and .eth to urls (#2792)

* add .eth

* refactor ifs

* solve for wallet.ethereum.org

* Fixing delay problem

* Update README.md (#2829)

* Node version field.

* Borrowing sentence from truffle's issue template

* Complete Albanian translation (#2919)

* Nightly backup

* Typo fix

* Fix formatting

* Complete mist.sq.i18n.json

* Complete mist.sq.i18n.json

* Possible fixes

* add menu item list

* fix syntax error

* Fit in with other translations

* Fixing json format (#2946)

* Fixing gitter URL (#2948)

* Updating geth (#2949)

* Update solc 1.4.15 (#2960)

* WIP: update solidity to 1.4.12

* Updating solc to 0.4.13

* Updating to solc 0.4.15

* Update copyright year 2016 to 2017 on About page (#3000)

Update copyright year 2016 to 2017 on About page

* Adds GitHub PR template (#3035)

* Revert "Update copyright year 2016 to 2017 on About page" (#3037)

* Revert "Adds GitHub PR template (#3035)"

This reverts commit ba7a210.

* Revert "Update copyright year 2016 to 2017 on About page (#3000)"

This reverts commit c8a64f1.

* Compiles ES6+ (#3034)

* Compiles es6+7

* Optionally skipping gulp tasks

* Rearranges deps

* Fixing menuItems bug

* Transpiles with Babel

* Runs dev with Babel

* Compiles modules directory

* Fixes Swarm template typos (#3048)

* Tweaks README for new dev script (#3058)

* Update geth binaries to 1.7.0 (#3046)

Ethereum to the moon!!! YAY!!!
@lock
Copy link

lock bot commented Mar 30, 2018

This thread has been automatically locked because it has not had recent activity. Please open a new issue for related bugs and link to relevant comments in this thread.

@lock lock bot locked and limited conversation to collaborators Mar 30, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants