Skip to content

Conversation

leandro-cavalcante
Copy link
Contributor

@leandro-cavalcante leandro-cavalcante commented Apr 15, 2025

Description

Enhanced message errors for the end point /policy-content. Now when one or more required parameters are missing, the message error lists the required parameters and also possible values. Helping the user to identify incorrect or missing values faster.

Why

When requesting a policy from Get /policy-content, the client may use an incorrect parameter key, receive a 200 response, and incorrectly assume that the policy states what they intended it to state.

Issue

Enhance message errors

Checklist

Please delete options that are not relevant.

  • I have followed the contributing guidelines
  • I have performed a self-review of my own code
  • I have successfully tested my changes locally
  • I have added tests that prove my changes work
  • I have checked that new and existing tests pass locally with my changes
  • I have commented my code, particularly in hard-to-understand areas
  • I have added copyright and license headers, footers (for .md files) or files (for images)

leandro-cavalcante and others added 3 commits April 15, 2025 09:09
…ractusx#48)

Co-authored-by: Arnab Kumar Nandy (Cofinity-X) <150015794+arnabcx@users.noreply.github.com>
Co-authored-by: Nitesh Sakhiya <37956326+niteshsakhiya@users.noreply.github.com>
Copy link
Member

@Phil91 Phil91 left a comment

Choose a reason for hiding this comment

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

I really don't like the approach of changing all the parameters fro there specific type to string values. that completely messes up the swagger documentation and gives one the impression that all values are allowed, without a hint that only specific values will work.

I'd really like to discuss this approach and not include it in the release, since it makes the swagger documentation more or less useless. The parameters are validated by the framework if a wrong value is set.

@leandro-cavalcante @evegufy

@leandro-cavalcante
Copy link
Contributor Author

leandro-cavalcante commented May 8, 2025

I really don't like the approach of changing all the parameters fro there specific type to string values. that completely messes up the swagger documentation and gives one the impression that all values are allowed, without a hint that only specific values will work.

I'd really like to discuss this approach and not include it in the release, since it makes the swagger documentation more or less useless. The parameters are validated by the framework if a wrong value is set.

@leandro-cavalcante @evegufy

I think you have a valid point and I also agree with it. Anyway this request comes in order to make the life of the customer easier and to understand what is going on with the data they are requesting. Only the swagger is not enough for them to have a quick understanding on the errors that are thrown to them. It would be nice to discuss this deeply and then decide with we just drop it off or not.

@evegufy
Copy link
Contributor

evegufy commented May 8, 2025

@leandro-cavalcante I recommend to discuss this in the next open portal meeting on Tuesday, I suggest that you write a message in the portal matrix chat, to reserve some time in the agenda for this issue.
I'll remove the milestone for the R25.06.

@evegufy evegufy removed this from the Release 25.06 milestone May 8, 2025
@evegufy evegufy removed their request for review July 9, 2025 15:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: No status
Development

Successfully merging this pull request may close these issues.

3 participants