Merge remote-tracking branch 'origin/dev-1.5' into development

This commit is contained in:
anhefti 2023-06-15 15:09:56 +02:00
commit 6573b1438b
3 changed files with 10 additions and 3 deletions

View file

@ -185,6 +185,9 @@ public final class PageAction {
} catch (final PageMessageException pme) { } catch (final PageMessageException pme) {
PageAction.this.pageContext.publishPageMessage(pme); PageAction.this.pageContext.publishPageMessage(pme);
return; return;
} catch (final Exception e) {
this.pageContext.notifyUnexpectedError(e);
return;
} }
} else { } else {
callback.accept(exec()); callback.accept(exec());

View file

@ -180,7 +180,7 @@ public abstract class RestCall<T> {
e, e,
"NO RESPONSE AVAILABLE", "NO RESPONSE AVAILABLE",
String.valueOf(builder))); String.valueOf(builder)));
return Result.ofError(e); return Result.ofError(restCallError);
} }
} }
@ -216,6 +216,10 @@ public abstract class RestCall<T> {
} else { } else {
restCallError.errors.add(APIMessage.ErrorMessage.GENERIC.of(responseEntity.getBody())); restCallError.errors.add(APIMessage.ErrorMessage.GENERIC.of(responseEntity.getBody()));
} }
} catch (final Exception e) {
final String body = responseEntity.getBody();
log.error("Failed to parse rest response error message: {}", body);
throw e;
} }
log.debug( log.debug(

View file

@ -1578,7 +1578,7 @@ public class UseCasesIntegrationTest extends GuiIntegrationTest {
fail("Exception expected here"); fail("Exception expected here");
} catch (final Exception e) { } catch (final Exception e) {
assertEquals("argument \"content\" is null", e.getMessage()); assertEquals("Unexpected error while rest call", e.getMessage());
} }
// test follow-up integrity violation // test follow-up integrity violation
@ -1596,7 +1596,7 @@ public class UseCasesIntegrationTest extends GuiIntegrationTest {
fail("Exception expected here"); fail("Exception expected here");
} catch (final Exception e) { } catch (final Exception e) {
assertEquals("argument \"content\" is null", e.getMessage()); assertEquals("Unexpected error while rest call", e.getMessage());
} }
final ConfigurationTableValues newTableValue = new ConfigurationTableValues( final ConfigurationTableValues newTableValue = new ConfigurationTableValues(