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

Updating with a bad identifier throws 500 instead of 404 #15799

Closed
erickgonzalez opened this issue Jan 9, 2019 · 4 comments

Comments

Projects
None yet
6 participants
@erickgonzalez
Copy link
Contributor

commented Jan 9, 2019

Related to: #15433

When you update via curl and send an identifier that does not exist it returns a 500 and should return a 404.

curl -v -u admin@dotcms.com:admin -XPUT http://localhost:8080/api/vtl/employees -F "json={
   "identifier":"af047c97-1g91-4642-9cbb-2fbdef4da1cb",
   "contentType":"Employee",
   "languageId":1,
   "host1":"demo.dotcms.com",
   "firstName":"Daniel2",
   "lastName": "Silva2",
   "jobTitle": "Dev",
   "email": "daniel.silva@dotcms.com",
   "mobile": "8325553355", 
   "gender": "male",
   "binaryFields": [ "photo", "photo2" ]};
   type=application/json" -F "file=@/Users/danielsilva/Downloads/testImages/testImage1.jpg; type=application/jpg" -F "file=@/Users/danielsilva/Downloads/secondFile.jpg; type=application/jpg"
   
PATCH / UPDATE PARTIALLY

curl -v -u admin@dotcms.com:admin -XPATCH http://localhost:8080/api/vtl/employees/af047c97-1a91-4642-9gbb-2fbdef4da1cb -F "json={
   "lastName": "Silva Patched",
   "jobTitle": "Dev Patched",
   "binaryFields": [ "photo2" ]};
   type=application/json" -F "file=@/Users/danielsilva/Downloads/secondFile.jpg; type=application/jpg"   

@erickgonzalez erickgonzalez added this to the Rex Current milestone Jan 9, 2019

@dsilvam

This comment has been minimized.

Copy link
Contributor

commented Jan 9, 2019

The problem here is down at the API level - Workflow API, and one of the ways to reproduce it is via what's described above.

@dsilvam

This comment has been minimized.

Copy link
Contributor

commented Jan 9, 2019

@wezell wezell removed the Release : 5.1.0 label Jan 25, 2019

@dsilvam dsilvam modified the milestones: 01292019_REX, Rex Current Jan 29, 2019

@wezell wezell modified the milestones: Rex Current, Cody Current Feb 21, 2019

jdotcms added a commit that referenced this issue Mar 28, 2019

jdotcms added a commit that referenced this issue Mar 28, 2019

jdotcms added a commit that referenced this issue Mar 28, 2019

jdotcms added a commit that referenced this issue Mar 28, 2019

jdotcms added a commit that referenced this issue Apr 1, 2019

jgambarios added a commit that referenced this issue Apr 2, 2019

Issue 15799 when identifier does not exists throws exception (#16305)
* #16252 format source. Introduce format checker on build. Alter style … (#16288)

* #16252 format source. Introduce format checker on build. Alter style files

* #16252 remove unwanted file

* #16252 remove unwanted file

* Updating commit reference for src/main/enterprise

* try different location for checkstyle.xml

* Revert "#16252 format source. Introduce format checker on build. Alter style … (#16288)" (#16291)

This reverts commit 05f9082.

* Updating commit reference for src/main/enterprise

* #15799 now when the identifier does not exists return 404, also when the vtl does not exists returns 404

* #15799 removing unused imports

* #15799 feedback and unit test

* #15799 feedback and unit test2

jdotcms added a commit that referenced this issue Apr 2, 2019

jdotcms added a commit that referenced this issue Apr 3, 2019

@jgambarios

This comment has been minimized.

Copy link
Contributor

commented Apr 5, 2019

PR: #16328

jgambarios added a commit that referenced this issue Apr 5, 2019

Issue 15799 when identifier does not exists throws exception2 (#16328)
* #16252 format source. Introduce format checker on build. Alter style … (#16288)

* #16252 format source. Introduce format checker on build. Alter style files

* #16252 remove unwanted file

* #16252 remove unwanted file

* Updating commit reference for src/main/enterprise

* try different location for checkstyle.xml

* Revert "#16252 format source. Introduce format checker on build. Alter style … (#16288)" (#16291)

This reverts commit 05f9082.

* Updating commit reference for src/main/enterprise

* #15799 now when the identifier does not exists return 404, also when the vtl does not exists returns 404

* #15799 removing unused imports

* #15799 feedback and unit test

* #15799 feedback and unit test2

* #15799 fixes and unit test

* #15799 doing a refactor
@bryanboza

This comment has been minimized.

Copy link
Contributor

commented Apr 12, 2019

Fixed, new improvement reported on #16305

@wezell wezell closed this Apr 15, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.