Skip to content
This repository was archived by the owner on Feb 26, 2023. It is now read-only.
This repository was archived by the owner on Feb 26, 2023. It is now read-only.

@SetsCookie causes RestClientErrorHandling to stop working on non-200 reponses #971

@colinfindlay-nz

Description

@colinfindlay-nz

Without @SetsCookie the code generates

    try {
            restTemplate.exchange(etc....
    } catch (RestClientException e) {

With a @SetsCookie you get:

    ResponseEntity<LoginResult> response = restTemplate.exchange(etc...
    String[] requestedCookies = cookie setting code....
    try {
        return response.getBody();
    } catch (RestClientException e) {

So - if a REST service returns a non-200 HTTP code - your error handling is skipped.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions