Skip to content

Commit

Permalink
Merge pull request #1431 from CMSgov/feature/QPPSE-1728-Fix_Internal_…
Browse files Browse the repository at this point in the history
…Server_Error

QPPSE-1728: Updated Detail component to accept string errors from submission api
  • Loading branch information
sivaksb authored Apr 17, 2024
2 parents c4a2747 + 26cfb44 commit 38c8adf
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,15 @@ public Detail() {
// Dummy constructor for jackson mapping and to support copy constructor
}

/**
* Constructor to accept detail message without an object
*
* @param detail string to set message
*/
public Detail(String detail) {
this.setMessage(detail);
}

/**
* Copy constructor
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,4 +56,10 @@ void testComputeLocationEmpty() {

assertThat(detail.getLocation().getLocation()).isEmpty();
}

@Test
public void testDetailStringArray() {
Detail detail = new Detail("test");
assertThat(detail.getMessage()).isEqualTo("test");
}
}

0 comments on commit 38c8adf

Please sign in to comment.