Careless Error Handling of Joget Web API

Confluence User - 04 Apr, 2018

The Joget Web API doesn't handle error properly. Take start-process endpoint for example:

- Start a process with "Logged In User" start process whitelist

POST http://10.1.12.224:8080/jw/web/json/workflow/process/start/app-name:latest:process-name
Response: 200 OK {"activityId":"","processId":""}
Expected response: 403 FORBIDDEN

- Request a wrong process name

POST http://10.1.12.224:8080/jw/web/json/workflow/process/start/app-name:latest:wrong-process-name
Response: 200 OK {"activityId":"","processId":""}
Expected response: 404 NOT FOUND

 

Is it possible to modify Joget web API to handle errors properly?

web-api;start-process-endpoint;error-handling

1


05 Apr, 2018
confluenceUser
confluenceUser

Hi, I do not know about modifying the API unless you wish to change the source code directly, but based on the existing behavior you could handle the response by checking  the values of the processId and/or activityId.

 

RELATED QUESTIONS

Your answer


To answer a question you'll need an account.

Print