sbglasius commented on code in PR #15234:
URL: https://github.com/apache/grails-core/pull/15234#discussion_r2538237871
##########
grails-test-examples/views-functional-tests/src/integration-test/groovy/functional/tests/BookSpec.groovy:
##########
@@ -56,22 +56,17 @@ class BookSpec extends HttpClientSpec {
HttpClientResponseException e = thrown()
e.response.status == HttpStatus.UNPROCESSABLE_ENTITY
e.response.headers.getFirst(HttpHeaders.CONTENT_TYPE).isPresent()
- // This has changed somewhere along the way
- // e.response.headers.getFirst(HttpHeaders.CONTENT_TYPE).get() ==
'application/vnd.error;charset=UTF-8'
- // to ->
- e.response.headers.getFirst(HttpHeaders.CONTENT_TYPE).get() ==
'application/json;charset=UTF-8'
- objectMapper.readTree(e.response.body().toString()) ==
objectMapper.readTree('''
+ e.response.headers.getFirst(HttpHeaders.CONTENT_TYPE).get() ==
'application/vnd.error;charset=UTF-8'
+ objectMapper.readTree(e.response.body().toString()) ==
objectMapper.readTree("""
{
- "errors": [
- {
- "object": "functional.tests.Book",
- "field": "title",
- "rejected-value": null,
- "message": "Property [title] of class [class
functional.tests.Book] cannot be null"
- }
- ]
- }
- ''')
+ "message": "Property [title] of class [class
functional.tests.Book] cannot be null",
Review Comment:
Yes, I found it because my client had a custom `_errors.gson` file that was
not rendered.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]