[WPB-20053] Create user groups with scim.#4848
Conversation
| <> (Text.decodeUtf8With lenientDecode . toStrict . errBody $ serr) | ||
| ) | ||
| werr <- renderSparErrorWithLogging err <&> httpErrorToWaiError | ||
| -- TODO: we don't want to include the RichError part of |
There was a problem hiding this comment.
Was staring at the RichError data construction as well and wondering when if ever is the rich part used. It seems it's currently used in the Eq instance (newly added in this PR), and then constructed/used here services/brig/src/Brig/API/Error.hs:203:deleteUserError (DeleteUserPendingCode t) = RichError deletionCodePending (DeletionCodeTimeout t) [], everywhere else it's filled with ()/Null. I guess the question is: what is it's purpose, internal for debugging or could the outside world see it?
There was a problem hiding this comment.
I suppose it's been solely for the deleteUserError use case so far then, but now we have two use cases :)
| notifyAdmins ug | ||
| pure ug | ||
| where | ||
| guardMembersInTeam :: Sem r () |
There was a problem hiding this comment.
i rewrote this because i found the old code hard to read. probably should have done that in another PR...
| renderSparError (SAML.CustomError (SparSomeHttpError err)) = err | ||
| -- Other | ||
| renderSparError (SAML.CustomServant err) = Left err | ||
| renderSparError (SAML.CustomServant err) = serverErrorToHttpError err |
There was a problem hiding this comment.
If httpErrorToServerError . serverErrorToHttpError == id does not hold, the error will be rendered differently to the client. I think all the differences between the two should be cosmetic, though?
| <> (Text.decodeUtf8With lenientDecode . toStrict . errBody $ serr) | ||
| ) | ||
| werr <- renderSparErrorWithLogging err <&> httpErrorToWaiError | ||
| -- TODO: we don't want to include the RichError part of |
There was a problem hiding this comment.
I suppose it's been solely for the deleteUserError use case so far then, but now we have two use cases :)
Checklist
changelog.d