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

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.

Activity

  1. yDelouis commented on Apr 20, 2014

    @yDelouis
    Contributor

    This issue is a duplicate of #914 and has been fixed by #915.
    You should use the snapshot version if you want to have the fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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