Skip to content

CP-311257: Raise proper error code#6963

Merged
liulinC merged 2 commits intoxapi-project:feature/ldapsfrom
liulinC:private/linl/errmsg
Mar 23, 2026
Merged

CP-311257: Raise proper error code#6963
liulinC merged 2 commits intoxapi-project:feature/ldapsfrom
liulinC:private/linl/errmsg

Conversation

@liulinC
Copy link
Collaborator

@liulinC liulinC commented Mar 20, 2026

No description provided.

`try_map_any f l` apply f on l and return
- Ok if any `f e` succeed
- Error list if all failed

Signed-off-by: Lin Liu <lin.liu01@citrix.com>
@liulinC liulinC force-pushed the private/linl/errmsg branch from f8b19a6 to de6f8c9 Compare March 20, 2026 07:18
- Define new errors for invalid certificate, pool and host level
- Remove AD joined check as it was already done in extauth.ml
- Move certificate to extauth_plugin_ADwinbind.ml so it can shared
between set-ldaps and enable-ad
- ping_domain use try_map_any to propagate the error details

Signed-off-by: Lin Liu <lin.liu01@citrix.com>
@liulinC liulinC force-pushed the private/linl/errmsg branch from de6f8c9 to da6c8bf Compare March 20, 2026 07:33
in
loop [] l

let try_map_any f l =
Copy link
Contributor

Choose a reason for hiding this comment

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

Does this code not return the result of f x? So what is the purpose of this code then?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yes, I think it return either

  • Ok value
  • Error (e list)

Copy link
Contributor

Choose a reason for hiding this comment

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

You are right. ok binds the result.

@liulinC liulinC merged commit e17315c into xapi-project:feature/ldaps Mar 23, 2026
16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants