{"action":"created","issue":{"url":"https://api.github.com/repos/serverless/serverless/issues/755","repository_url":"https://api.github.com/repos/serverless/serverless","labels_url":"https://api.github.com/repos/serverless/serverless/issues/755/labels{/name}","comments_url":"https://api.github.com/repos/serverless/serverless/issues/755/comments","events_url":"https://api.github.com/repos/serverless/serverless/issues/755/events","html_url":"https://github.com/serverless/serverless/issues/755","id":139442727,"number":755,"title":"Similar function name issue ","user":{"login":"ajagnanan","id":752895,"avatar_url":"https://avatars.githubusercontent.com/u/752895?v=3","gravatar_id":"","url":"https://api.github.com/users/ajagnanan","html_url":"https://github.com/ajagnanan","followers_url":"https://api.github.com/users/ajagnanan/followers","following_url":"https://api.github.com/users/ajagnanan/following{/other_user}","gists_url":"https://api.github.com/users/ajagnanan/gists{/gist_id}","starred_url":"https://api.github.com/users/ajagnanan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ajagnanan/subscriptions","organizations_url":"https://api.github.com/users/ajagnanan/orgs","repos_url":"https://api.github.com/users/ajagnanan/repos","events_url":"https://api.github.com/users/ajagnanan/events{/privacy}","received_events_url":"https://api.github.com/users/ajagnanan/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2016-03-09T01:06:50Z","updated_at":"2016-05-12T10:21:39Z","closed_at":"2016-05-12T10:21:39Z","body":"I stumbled on this issue today.\r\n\r\nv0.4.2\r\n\r\nSteps to reproduce:\r\n\r\n- 2 functions with names: application, application_id\r\n- run: `sls endpoint deploy application`\r\n- Error: ` GET - applications: Could not find function for endpoint` \r\n\r\nPossible location of failure: ServerlessEndpoint.js - getFunction()\r\n\r\n```\r\nServerless:   GET - applications: Could not find function for endpoint\r\n  serverless:lib.node_modules.serverless.lib.actions.EndpointDeploy ServerlessError: Could not find function for endpoint\r\n    at new ServerlessError (/usr/local/lib/node_modules/serverless/lib/ServerlessError.js:17:11)\r\n    at ServerlessEndpoint.getFunction (/usr/local/lib/node_modules/serverless/lib/ServerlessEndpoint.js:257:11)\r\n    at Builder._validateAndPrepare (/usr/local/lib/node_modules/serverless/lib/actions/EndpointBuildApiGateway.js:164:43)\r\n    at Builder.build (/usr/local/lib/node_modules/serverless/lib/actions/EndpointBuildApiGateway.js:77:20)\r\n    at EndpointBuildApiGateway.endpointBuildApiGateway (/usr/local/lib/node_modules/serverless/lib/actions/EndpointBuildApiGateway.js:57:22)\r\n    at processImmediate [as _immediateCallback] (timers.js:383:17)\r\nFrom previous event:\r\n    at /usr/local/lib/node_modules/serverless/lib/Serverless.js:181:25\r\n    at Array.reduce (native)\r\n    at Serverless._execute (/usr/local/lib/node_modules/serverless/lib/Serverless.js:180:26)\r\n    at Object.actions.(anonymous function) [as endpointBuildApiGateway] (/usr/local/lib/node_modules/serverless/lib/Serverless.js:381:20)\r\n    at /usr/local/lib/node_modules/serverless/lib/actions/EndpointDeploy.js:302:42\r\nFrom previous event:\r\n    at /usr/local/lib/node_modules/serverless/lib/actions/EndpointDeploy.js:285:35\r\n    at /usr/local/lib/node_modules/serverless/node_modules/async/lib/async.js:181:20\r\n    at iterate (/usr/local/lib/node_modules/serverless/node_modules/async/lib/async.js:262:13)\r\n    at Object.async.forEachOfSeries.async.eachOfSeries (/usr/local/lib/node_modules/serverless/node_modules/async/lib/async.js:281:9)\r\n    at Object.async.forEachSeries.async.eachSeries (/usr/local/lib/node_modules/serverless/node_modules/async/lib/async.js:214:22)\r\n    at BbPromise.then.newEvt.options.stage (/usr/local/lib/node_modules/serverless/lib/actions/EndpointDeploy.js:281:19)\r\n    at /usr/local/lib/node_modules/serverless/lib/actions/EndpointDeploy.js:278:18\r\n    at Request.<anonymous> (/usr/local/lib/node_modules/serverless/node_modules/aws-sdk/lib/request.js:354:18)\r\n    at Request.callListeners (/usr/local/lib/node_modules/serverless/node_modules/aws-sdk/lib/sequential_executor.js:105:20)\r\nFrom previous event:\r\n    at /usr/local/lib/node_modules/serverless/lib/actions/EndpointDeploy.js:278:18\r\n    at Request.<anonymous> (/usr/local/lib/node_modules/serverless/node_modules/aws-sdk/lib/request.js:354:18)\r\n    at Request.callListeners (/usr/local/lib/node_modules/serverless/node_modules/aws-sdk/lib/sequential_executor.js:105:20)\r\n    at Request.emit (/usr/local/lib/node_modules/serverless/node_modules/aws-sdk/lib/sequential_executor.js:77:10)\r\n    at Request.emit (/usr/local/lib/node_modules/serverless/node_modules/aws-sdk/lib/request.js:596:14)\r\n    at Request.transition (/usr/local/lib/node_modules/serverless/node_modules/aws-sdk/lib/request.js:21:10)\r\n    at AcceptorStateMachine.runTo (/usr/local/lib/node_modules/serverless/node_modules/aws-sdk/lib/state_machine.js:14:12)\r\n    at /usr/local/lib/node_modules/serverless/node_modules/aws-sdk/lib/state_machine.js:26:10\r\n    at Request.<anonymous> (/usr/local/lib/node_modules/serverless/node_modules/aws-sdk/lib/request.js:37:9)\r\n    at Request.<anonymous> (/usr/local/lib/node_modules/serverless/node_modules/aws-sdk/lib/request.js:598:12)\r\n    at Request.callListeners (/usr/local/lib/node_modules/serverless/node_modules/aws-sdk/lib/sequential_executor.js:115:18)\r\n    at Request.emit (/usr/local/lib/node_modules/serverless/node_modules/aws-sdk/lib/sequential_executor.js:77:10)\r\nFrom previous event:\r\n    at EndpointDeploy._deployEndpointsByRegion (/usr/local/lib/node_modules/serverless/lib/actions/EndpointDeploy.js:270:10)\r\n    at EndpointDeploy.<anonymous> (/usr/local/lib/node_modules/serverless/lib/actions/EndpointDeploy.js:230:24)\r\nFrom previous event:\r\n    at EndpointDeploy._processDeployment (/usr/local/lib/node_modules/serverless/lib/actions/EndpointDeploy.js:227:10)\r\nFrom previous event:\r\n    at EndpointDeploy.endpointDeploy (/usr/local/lib/node_modules/serverless/lib/actions/EndpointDeploy.js:113:10)\r\nFrom previous event:\r\n    at /usr/local/lib/node_modules/serverless/lib/Serverless.js:156:29\r\n    at Array.reduce (native)\r\n    at /usr/local/lib/node_modules/serverless/lib/Serverless.js:155:30\r\n    at processImmediate [as _immediateCallback] (timers.js:383:17)\r\nFrom previous event:\r\n    at Serverless._execute (/usr/local/lib/node_modules/serverless/lib/Serverless.js:153:10)\r\n    at Serverless.actions.(anonymous function) (/usr/local/lib/node_modules/serverless/lib/Serverless.js:381:20)\r\n    at Serverless.command (/usr/local/lib/node_modules/serverless/lib/Serverless.js:350:38)\r\n    at Object.<anonymous> (/usr/local/lib/node_modules/serverless/bin/serverless:16:12)\r\n    at Module._compile (module.js:410:26)\r\n    at Object.Module._extensions..js (module.js:417:10)\r\n    at Module.load (module.js:344:32)\r\n    at Function.Module._load (module.js:301:12)\r\n    at Function.Module.runMain (module.js:442:10)\r\n    at startup (node.js:136:18)\r\n    at node.js:966:3 +71ms\r\nServerless:\r\n```"},"comment":{"url":"https://api.github.com/repos/serverless/serverless/issues/comments/218717690","html_url":"https://github.com/serverless/serverless/issues/755#issuecomment-218717690","issue_url":"https://api.github.com/repos/serverless/serverless/issues/755","id":218717690,"user":{"login":"flomotlik","id":132653,"avatar_url":"https://avatars.githubusercontent.com/u/132653?v=3","gravatar_id":"","url":"https://api.github.com/users/flomotlik","html_url":"https://github.com/flomotlik","followers_url":"https://api.github.com/users/flomotlik/followers","following_url":"https://api.github.com/users/flomotlik/following{/other_user}","gists_url":"https://api.github.com/users/flomotlik/gists{/gist_id}","starred_url":"https://api.github.com/users/flomotlik/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/flomotlik/subscriptions","organizations_url":"https://api.github.com/users/flomotlik/orgs","repos_url":"https://api.github.com/users/flomotlik/repos","events_url":"https://api.github.com/users/flomotlik/events{/privacy}","received_events_url":"https://api.github.com/users/flomotlik/received_events","type":"User","site_admin":false},"created_at":"2016-05-12T10:21:39Z","updated_at":"2016-05-12T10:21:39Z","body":"Hi @ajagnanan we're going to reimplement this in the future in a way that this issue can't happen any more. I'm going to close this issue for now."}}