Skip to content

fix conversation list parser in stern#3035

Merged
battermann merged 6 commits intodevelopfrom
battermann/stern-get-conversations-fix
Jan 31, 2023
Merged

fix conversation list parser in stern#3035
battermann merged 6 commits intodevelopfrom
battermann/stern-get-conversations-fix

Conversation

@battermann
Copy link
Contributor

@battermann battermann commented Jan 30, 2023

Checklist

  • Add a new entry in an appropriate subdirectory of changelog.d
  • Read and follow the PR guidelines

@zebot zebot added the ok-to-test Approved for running tests in CI, overrides not-ok-to-test if both labels exist label Jan 30, 2023
@battermann battermann marked this pull request as ready for review January 30, 2023 13:00
@battermann battermann requested a review from fisx January 30, 2023 13:01
notfs <- Intra.getUserNotifications uid
consent <- Intra.getUserConsentValue uid
consentLog <- Intra.getUserConsentLog uid
consent <- (Intra.getUserConsentValue uid <&> Just) `catchE` \_ -> pure Nothing
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do these catch internal errors as well? do we want that?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't know, I just noticed that these fail and make the whole request fail, which is unnecessary, IMO.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

made a change, see comment below

. expect2xx
)
parseResponse (mkError status502 "bad-upstream") r
unVersioned @'V2 <$> parseResponse (mkError status502 "bad-upstream") r
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this wouldn't have happened if we used servant-client for calling internal api end-points... :)

@fisx
Copy link
Contributor

fisx commented Jan 30, 2023

#3036

@battermann
Copy link
Contributor Author

Internally, stern makes multiple requests, some of which can fail and in this case the error will be shown in the response without making the overall request fail.
image

@battermann battermann merged commit c556de8 into develop Jan 31, 2023
@battermann battermann deleted the battermann/stern-get-conversations-fix branch January 31, 2023 07:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ok-to-test Approved for running tests in CI, overrides not-ok-to-test if both labels exist

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

Comments