Skip to content

Insufficient detail logged on connection failure to IdP metadata URL #7089

@wfchandler

Description

@wfchandler

This issue arose recently when a customer is attempting to register a new SAMP IdP provider.

Nexus was unable to connect to the metadata URL provided, but we do not log enough information to say why the connection failed, returning only "error sending request for url".

Error Response:
status: 400 Bad Request;
headers: {
  "content-type": "application/json",
  "x-request-id": "xxx",
  "content-length": "248",
  "date": "Fri, 12 Nov 2024 22:52:59 GMT"
};
value:Error {
  error_code: Some("InvalidValue"),
  message: "unsupported value for \"url\": error querying url: error sending request for url (https://sso.example- 
  keycloak.com/realms/myrealm/protocol/saml/descriptor)",
  request_id: "xxx"
}

We have a couple similar issues, #6717 and #6716 around vague connection errors. The underlying issue is probably related to seanmonstar/reqwest#2342, which has some suggestions around ways to extract more detail.

A systematic way to ensure we're logging sufficient detail on chained errors seems necessary.

Metadata

Metadata

Assignees

No one assigned

    Labels

    DebuggingFor when you want better data in debugging an issue (log messages, post mortem debugging, and more)customerFor any bug reports or feature requests tied to customer requestsidp

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions