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

New event failure: API has changed? #356

Closed
kivanov82 opened this issue Oct 26, 2017 · 4 comments
Closed

New event failure: API has changed? #356

kivanov82 opened this issue Oct 26, 2017 · 4 comments

Comments

@kivanov82
Copy link
Contributor

Been new to alf.io, but when trying to create a new event I've faced an exception while calling getEvent() in services.js.
I see that API at the backend expects a param nota json.
Bug perhaps?

@cbellone
Copy link
Member

hi @kivanov82

thank you for your interest in alf.io!

I am not able to reproduce your issue. Could you please give me more details and/or the exact steps to reproduce it?

Thank you!

@kivanov82
Copy link
Contributor Author

hi @cbellone ,
sure, here it is:

  1. Creation of a new event calls getEvent() service (service.js line 56). Couldn't trace the reason though.
  2. That service makes an API call to '/admin/api/events/'+name+'.json'
  3. Looking at EventApiController there is no handler for the call above but there is one for /events/{name} (line 169, no json!). Hence 404
  4. Once I've dropped .json all works well
    PS. I think same story would be with '/admin/api/events/id/'+eventId+'.json'

Hope it helps!

@cbellone
Copy link
Member

cbellone commented Nov 5, 2017

Hi @kivanov82,

thanks for the details. I think I am starting to understand what's happening.

Sure, we can remove the .json suffix, because it's redundant and we don't really need it, but it should work anyway because it is ignored by Spring MVC while trying to resolve the path.
So that shouldn't be the cause of your issue.

I am wondering now if the error could be related in any way to the event URL.
e.g. does name in /admin/api/events/'+name+'.json' contain any special character?

Could you please share the exact URL that alf.io is trying to call, as you see it in the browser?

thanks!
Celestino

@kivanov82
Copy link
Contributor Author

Thanks Celestino,
I gave it another try and it works. Perhaps was my local glitch with Spring version.

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

No branches or pull requests

2 participants