karma-brackets icon indicating copy to clipboard operation
karma-brackets copied to clipboard

Error messages should be decoded.

Open jmaister opened this issue 11 years ago • 0 comments

When karma/jasmine/angular shows the errors they are URL-Encoded. It is difficult to read the messages.

Sample:

Error: [$injector:modulerr] http://errors.angularjs.org/1.2.22/$injector/modulerr?p0=poc2app&p1=%5B%24injector%3Amodulerr%5D%20http%3A%2F%2Ferrors.angularjs.org%2F1.2.22%2F%24injector%2Fmodulerr%3Fp0%3Dui.bootstrap%26p1%3D%255B%2524injector%253Anomod%255D%2520http%253A%252F%252Ferrors.angularjs.org%252F1.2.22%252F%2524injector%252Fnomod%253Fp0%253Dui.bootstrap%250Aw%252F%253C%2540http%253A%252F%252Flocalhost%253A9876%252Fbase%252FWebContent%252Flibs%252Fangular%252Fangular.min.js%253Fc66b93937039d5705d93a1e65fe9e7879f9f0a40%253A6%250AZc%252Fb.module%253C%252F%253C%252Fb%255Be%255D%253C%2540http%253A%252F%252Flocalhost%253A9876%252Fbase%252FWebContent%252Flibs%252Fangular%252Fangular.min.js%253Fc66b93937039d5705d93a1e65fe9e7879f9f0a40%253A20%250AZc%252Fb.module%253C%252F%253C%2540http%253A%252F%252Flocalhost%253A9876%252Fbase%252FWebContent%252Flibs%252Fangular%252Fangular.min.js%253Fc66b93937039d5705d93a1e65fe9e7879f9f0a40%253A20%250Ae%252F%253C%2540http%253A%252F%252Flocalhost%253A9876%252Fbase%252F
....

Decoded:

Error: [$injector:modulerr] http://errors.angularjs.org/1.2.22/$injector/modulerr?p0=poc2app&p1=[$injector:modulerr] http://errors.angularjs.org/1.2.22/$injector/modulerr?p0=ui.bootstrap&p1=[$injector:nomod] http://errors.angularjs.org/1.2.22/$injector/nomod?p0=ui.bootstrap
w/<@http://localhost:9876/base/WebContent/libs/angular/angular.min.js?c66b93937039d5705d93a1e65fe9e7879f9f0a40:6
Zc/b.module</</b[e]<@http://localhost:9876/base/WebContent/libs/angular/angular.min.js?c66b93937039d5705d93a1e65fe9e7879f9f0a40:20
Zc/b.module</<@http://localhost:9876/base/WebContent/libs/angular/angular.min.js?c66b93937039d5705d93a1e65fe9e7879f9f0a40:20
e/<@http://localhost:9876/base/
.... 

Solution: apply URL decode to the error messages.

jmaister avatar Aug 20 '14 14:08 jmaister