Bug 991098 - 200 OK returned when starting non existing task via REST, but server log contains NPE
200 OK returned when starting non existing task via REST, but server log cont...
Product: JBoss BPMS Platform 6
Classification: JBoss
Component: Business Central (Show other bugs)
Unspecified Unspecified
unspecified Severity high
: ER2
: 6.0.0
Assigned To: Marco Rietveld
Radovan Synek
Depends On:
  Show dependency treegraph
Reported: 2013-08-01 11:45 EDT by Radovan Synek
Modified: 2016-09-20 01:04 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2014-08-06 16:09:39 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
server log (72.89 KB, text/x-log)
2013-08-01 11:45 EDT, Radovan Synek
no flags Details

  None (edit)
Description Radovan Synek 2013-08-01 11:45:24 EDT
Created attachment 781665 [details]
server log

version: 6.0.0.CR1

Trying to start some task which does not exist by POST http://localhost:8080/business-central/rest/task/12345

The response is 200 OK is returned, but server log contains NPE: Unable to execute StartTaskCommand because of NullPointerException

1) why not to return 500 - internal server error with description of the problem?

2) couldn't be the NPE caught and replaced by more informative IllegalArgumentException (again, with some description)?

See the attached server log for more details.
Comment 1 Marco Rietveld 2013-08-06 16:48:57 EDT
Fixed with this commit: 

I did not change the status to modified because I don't know what the correct target milestone is.
Comment 2 Radovan Synek 2013-09-04 07:41:19 EDT
Verified on BPMS 6.0.0.ER2

Note You need to log in before you can comment on or make changes to this bug.