You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Current behaviour: curl corp.short.cm/%AF returns 500 Internal Server Error
Expected: curl corp.short.cm/%AF returns 400 Invalid request
I'm running a link shortener service and user put different combinations in path part, some of them are valid, some of them - not. This case I sent is a client error and there is no need to raise an exception here
URIError: URI malformed
?, in decodeURIComponent
File "/srv/shorturl_redirector/node_modules/koa-route/index.js", line 60, col 19, in decode
if (val) return decodeURIComponent(val);
?, in Array.map
File "/srv/shorturl_redirector/node_modules/koa-route/index.js", line 34, col 35, in null.<anonymous>
const args = m.slice(1).map(decode);
File "/srv/shorturl_redirector/node_modules/koa-compose/index.js", line 42, col 32, in dispatch
return Promise.resolve(fn(context, dispatch.bind(null, i + 1)));
File "/srv/shorturl_redirector/node_modules/koa-route/index.js", line 43, col 16, in null.<anonymous>
return next();
File "/srv/shorturl_redirector/node_modules/koa-compose/index.js", line 42, col 32, in dispatch
return Promise.resolve(fn(context, dispatch.bind(null, i + 1)));
File "/srv/shorturl_redirector/node_modules/koa-route/index.js", line 43, col 16, in null.<anonymous>
return next();
File "/srv/shorturl_redirector/node_modules/koa-compose/index.js", line 42, col 32, in dispatch
return Promise.resolve(fn(context, dispatch.bind(null, i + 1)));
File "/srv/shorturl_redirector/node_modules/koa-route/index.js", line 43, col 16, in null.<anonymous>
return next();
File "/srv/shorturl_redirector/node_modules/koa-compose/index.js", line 42, col 32, in dispatch
return Promise.resolve(fn(context, dispatch.bind(null, i + 1)));
File "/srv/shorturl_redirector/node_modules/koa-route/index.js", line 43, col 16, in null.<anonymous>
return next();
File "/srv/shorturl_redirector/node_modules/koa-compose/index.js", line 42, col 32, in dispatch
return Promise.resolve(fn(context, dispatch.bind(null, i + 1)));
File "/srv/shorturl_redirector/node_modules/koa-route/index.js", line 43, col 16, in null.<anonymous>
return next();
File "/srv/shorturl_redirector/node_modules/koa-compose/index.js", line 42, col 32, in dispatch
return Promise.resolve(fn(context, dispatch.bind(null, i + 1)));
File "/srv/shorturl_redirector/node_modules/koa-views/src/index.js", line 55, col 12, in views
return next()
File "/srv/shorturl_redirector/node_modules/koa-compose/index.js", line 42, col 32, in dispatch
return Promise.resolve(fn(context, dispatch.bind(null, i + 1)));
File "/srv/shorturl_redirector/node_modules/koa-body/index.js", line 110, col 14, in null.<anonymous>
return next();
File "internal/process/next_tick.js", line 68, col 7, in process._tickCallback
The text was updated successfully, but these errors were encountered:
gugu
linked a pull request
Apr 4, 2019
that will
close
this issue
Current behaviour:
curl corp.short.cm/%AF returns 500 Internal Server Error
Expected:
curl corp.short.cm/%AF returns 400 Invalid request
I'm running a link shortener service and user put different combinations in path part, some of them are valid, some of them - not. This case I sent is a client error and there is no need to raise an exception here
The text was updated successfully, but these errors were encountered: