Skip to content
This repository has been archived by the owner on Jul 23, 2024. It is now read-only.

[FLPATH-424] Return error message with status #411

Conversation

gabriel-farache
Copy link
Contributor

@gabriel-farache gabriel-farache commented Jun 8, 2023

What this PR does / why we need it:
This PR adds the error message contained in the Throwable of the WorkReport into the WorkflowExecution and saves it to the DB in order to return it when the /status endpoint is requested; the message is then sent along with the status

Which issue(s) this PR fixes
fixes #FLPATH-424

Change type

  • New feature
  • Bug fix
  • Unit tests
  • Integration tests
  • CI
  • Documentation
  • Auto-generated SDK code

Impacted services

  • Workflow Service
  • Notification Service

Checklist

  • Subject and description added to both, commit and PR.
  • Relevant issues have been referenced.

@openshift-ci openshift-ci bot requested review from eloycoto and rgolangh June 8, 2023 14:56
@@ -47,6 +47,8 @@ public class WorkStatusResponseDTO {

private WorkStatus status;

private String message;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JsonInclude(JsonInclude.Include.NON_EMPTY) ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The API contract/spec defines that the response contains a message field, this field shall be present for parodos to fulfil the contract.
This way, the API consumer will not have to worry about non-existing key when processing the response

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it can be optional. we can address it later

@masayag
Copy link
Collaborator

masayag commented Jun 11, 2023

overall, LGTM, but have one question about whether should we include a message in response if it is empty

@openshift-ci
Copy link

openshift-ci bot commented Jun 12, 2023

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: masayag

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-merge-robot openshift-merge-robot merged commit bdcfa6c into parodos-dev:main Jun 12, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants