Handle exception on non available/accessible issue
deeaitsch84 opened this issue · 0 comments
deeaitsch84 commented
Expected behaviour
Exceptions must be handled gracefully
Actual behaviour
Application throws exception on non available issue
Steps to reproduce
- Add
FOO-1337 I am a non existing issue
to log file - ./txt2jira commit will produce the following output and stops the exceution
`Exception {"errorMessages":["Issue does not exist or you do not have permission to see it."],"errors":{}}
(thrown in /Users/dennis/projects/tools/txt2jira/src/JiraClient.php:78)
Stack Trace:
- App\JiraClient->post('/rest/api/2/issue//worklog', ['', '2022-10-20T13:15:00.000+0000', '15'])
at /Users/dennis/projects/tools/txt2jira/src/JiraClient.php:91 - App\JiraClient->addWorkLog('', '', DateTime, '15')
at /Users/dennis/projects/tools/txt2jira/src/Exporter.php:21 - App\Exporter->export(***)
at /Users/dennis/projects/tools/txt2jira/src/ExecuteCommand.php:66 - App\ExecuteCommand->execute(NULL, NULL, 5)
at /Users/dennis/projects/tools/txt2jira/vendor/adhocore/cli/src/Application.php:348 - Ahc\Cli\Application->doAction(App\ExecuteCommand)
at /Users/dennis/projects/tools/txt2jira/vendor/adhocore/cli/src/Application.php:272 - Ahc\Cli\Application->handle(['./txt2jira', 'commit'])
at /Users/dennis/projects/tools/txt2jira/txt2jira:14`