Skip to content
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

Syncano-cli call throws error on grouped endpoint #57

Closed
chinazor-allen opened this issue Dec 8, 2017 · 5 comments
Closed

Syncano-cli call throws error on grouped endpoint #57

chinazor-allen opened this issue Dec 8, 2017 · 5 comments

Comments

@chinazor-allen
Copy link

chinazor-allen commented Dec 8, 2017

s call throws error message on grouped endpoint (e.g s call stripe/charge/createcharges/) when run on command line, but, endpoint works fine in postman and browers.

In defining the grouped endpoint, the following steps were taken:

  • Create a charge folder in src folder
  • create charge related script file (e.g. createCharges.js, retrieveCharges.js, e.t.c.) in src/charge folder
  • Define endpoint in socket.yml file as shown below (N/B: without the file path):

screen shot 2017-12-08 at 7 16 10 pm

Error message:

No such endpoint on the server! Make sure you have synced your socket.

@mkucharz
Copy link
Member

@Andela-callen @adamwardecki I think actually that kind of format of the endpoint name can create lot more of such problems and for now should be forbidden. Fo example if file parameter is not specified Syncano will search for src/<filename>.js... with path separator in it that can be troublesome.

@23doors
Copy link
Member

23doors commented Dec 18, 2017

Haven't tested it but checked the code and seems that it should look for src/charge/createCharges.js in this case and work correctly with path separators

@mkucharz
Copy link
Member

@23doors do you think we should support it? It is a nice twist, but it is not gonna work with windows (not sure if we will ever try to bring support in non-linux env).

@23doors
Copy link
Member

23doors commented Dec 19, 2017

@mkucharz hm. It should work on windows as well. Unless I misunderstood something. Backend should deal with it normally (as we're dealing with a zipfile anyway so path delimeter is always the same for us) and node also seem to always use '/' in require as path delimeter (at least I wasn't able to find any info about it being different). So it seems there is no harm in adding support for it in s call as well.

@mkucharz
Copy link
Member

@23doors @Andela-callen ok, I'll try to support that feature then

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants