ErrorResponse support in Spring MVC exception hierarchy
All Spring MVC exceptions from spring-web, now implement ErrorResponse and expose HTTP error response information, including an RFC 7807 body. See gh-27052
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2019 the original author or authors.
|
||||
* Copyright 2002-2022 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -84,7 +84,7 @@ public class DispatcherHandlerErrorTests {
|
||||
StepVerifier.create(mono)
|
||||
.consumeErrorWith(ex -> {
|
||||
assertThat(ex).isInstanceOf(ResponseStatusException.class);
|
||||
assertThat(ex.getMessage()).isEqualTo("404 NOT_FOUND \"No matching handler\"");
|
||||
assertThat(ex.getMessage()).isEqualTo("404 NOT_FOUND");
|
||||
})
|
||||
.verify();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user