Details
-
Suggestion
-
Resolution: Unresolved
-
None
-
0
-
5
-
Description
NOTE: This suggestion is for JIRA Server. Using JIRA Cloud? See the corresponding suggestion.
When transit an issue to another state, we refer to the following transition ID found in the GET method JSON.
For example:
- GET http://localhost:8080/rest/api/latest/issue/TEST-1/transitions
- The request returns the states 'Resolved' => '5', 'Closed' => '6', 'In Progress' => '3'.
- POST http://localhost:8080/rest/api/latest/issue/TEST-1/transitions
{"transition":{"id":"7"}}
- This time with JSON data {"transition":{"id":"7"}} and get the '500 Internal Server Error' because transition ID = 7 is not exist.
2015-01-21 17:54:29,343 http-bio-8080-exec-20 ERROR admin 1134x2089x1 xxxx xx.xx.xx.xx /rest/api/latest/issue/TEST-1/transitions [jira.rest.exception.ExceptionInterceptor] Returning internal server error in response java.lang.reflect.InvocationTargetException at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at com.atlassian.plugins.rest.common.interceptor.impl.DispatchProviderHelper$ResponseOutInvoker$1.invoke(DispatchProviderHelper.java:234) at com.atlassian.plugins.rest.common.interceptor.impl.DispatchProviderHelper$1.intercept(DispatchProviderHelper.java:100) at com.atlassian.plugins.rest.common.interceptor.impl.DefaultMethodInvocation.invoke(DefaultMethodInvocation.java:61) ... Caused by: java.lang.NullPointerException at com.atlassian.jira.workflow.WorkflowActionsBean.getFieldScreenForView(WorkflowActionsBean.java:59) at com.atlassian.jira.issue.fields.screen.StandardFieldScreenRendererFactory.getScreenFromAction(StandardFieldScreenRendererFactory.java:130) at com.atlassian.jira.issue.fields.screen.StandardFieldScreenRendererFactory.createFieldScreenRenderer(StandardFieldScreenRendererFactory.java:55) at com.atlassian.jira.issue.fields.screen.FieldScreenRendererFactoryImpl.getFieldScreenRenderer(FieldScreenRendererFactoryImpl.java:55)
The NPE error is misleading to user and it would be great if JIRA can handle the error by showing a meaningful error message. Besides being misleading it seems to indicate that there is a bug in the error handling routines, and IMHO should be fixed.
Attachments
Issue Links
- relates to
-
JRACLOUD-42036 JIRA REST API returned a NPE error if stated wrong transition ID
- Closed