Closed JuannFerrari closed 4 years ago
@JuannFerrari Hey, thanks for looking into it! Could you share the current behavior? What happens if we don't apply your PR?
@etagwerker Sure, no problem!
Description
When a user tries to create a new assignment in a project the gem does the next:
POST /v2/projects/{PROJECT_ID}/user_assignments
The problem is that the PROJECT_ID could be nil (in the worst-case scenario), so the response of Harvest API is an HTML body (in a string) with 404 HTTP code.
This provokes a JSONParser::Error because the gem tries to parse the string of an HTML body response
Hi guys! thank you for developing this gem
I left here a PR https://github.com/fastruby/harvesting/pull/54 to rescue when the Harvest API returns a 404 status code to Harvesting gem.
I hope you find it useful ❤️