Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

location-retrieval: Alignment of errors with Commonalities #221

Merged
merged 4 commits into from
Jul 23, 2024

Conversation

bigludo7
Copy link
Collaborator

@bigludo7 bigludo7 commented Jul 2, 2024

What type of PR is this?

Add one of the following kinds:

  • enhancement/feature

What this PR does / why we need it:

Alignement of errors according to Commonalities guideline.

Which issue(s) this PR fixes:

Fixes #219

Special notes for reviewers:

Changelog input

 release-note
- Aligned error code list & description with Commonalities

Additional documentation

This section can be blank.

docs

Alignment of errors with Commonalities
@bigludo7 bigludo7 requested a review from jlurien as a code owner July 2, 2024 08:58
Copy link

github-actions bot commented Jul 2, 2024

🦙 MegaLinter status: ✅ SUCCESS

Descriptor Linter Files Fixed Errors Elapsed time
✅ ACTION actionlint 2 0 0.03s
✅ OPENAPI spectral 3 0 4.99s
✅ REPOSITORY git_diff yes no 0.01s
✅ REPOSITORY secretlint yes no 0.86s
✅ YAML yamllint 3 0 0.71s

See detailed report in MegaLinter reports

MegaLinter is graciously provided by OX Security

@bigludo7 bigludo7 changed the title Location-retrieval: Alignment of errors with Commonalities location-retrieval: Alignment of errors with Commonalitiel Jul 2, 2024
@bigludo7 bigludo7 changed the title location-retrieval: Alignment of errors with Commonalitiel location-retrieval: Alignment of errors with Commonalities Jul 2, 2024
value:
status: 400
code: INVALID_ARGUMENT
message: "Invalid argument"
MaxAgeIssue:
message: Client specified an invalid argument, request body or query param.
Copy link
Collaborator

Choose a reason for hiding this comment

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

In theory this also applies to request headers. Maybe we can simplify the sentence, keep it more generic ?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Hello @alpaycetin74
I used the the template from commonalities here - line 146.... so probably we cannot change this.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Also, the value for message in examples are not normative, only the code. Implementation may return any other, even in different language

examples:
GENERIC_403_PERMISSION_DENIED:
summary: Generic Permission Denied
description: Permission denied. OAuth2 token access does not have the required scope or when the user fails operational security
Copy link
Collaborator

Choose a reason for hiding this comment

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

Maybe reword as "OAuth2 token does not have access to the required scope, or the user fails operational security" ?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Same previous. I took this from commonalities here - line 192

@bigludo7 bigludo7 added the Fall24 Meta-release Fall24 label Jul 11, 2024
jlurien
jlurien previously approved these changes Jul 15, 2024
Copy link
Collaborator

@jlurien jlurien left a comment

Choose a reason for hiding this comment

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

Looks good, apart from reference to mobile

message: 'The specified resource is not found'
deviceNotFound:
LOCATION_RETRIEVAL_404_UNABLE_TO_LOCATE_DEVICE:
summary: The location server is not able to locate the mobile
Copy link
Collaborator

Choose a reason for hiding this comment

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

Maybe better "device" instead of "mobile"

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 - fixed.

Changed mobile to device for error 404
@bigludo7
Copy link
Collaborator Author

Fixed last @jlurien comment.
José, @alpaycetin74 we can probably move forward with this one.

@alpaycetin74
Copy link
Collaborator

Fixed last @jlurien comment. José, @alpaycetin74 we can probably move forward with this one.

I agree, thank you.

@bigludo7
Copy link
Collaborator Author

@jlurien May I ask you to take a look on this one. I guess we need to move quick on this one for the meta-release. Thanks

jlurien
jlurien previously approved these changes Jul 19, 2024
Copy link
Collaborator

@jlurien jlurien left a comment

Choose a reason for hiding this comment

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

We may need to add support for 422 UNIDENTIFIABLE_DEVICE both this one and verification, but we can ammend that once Commonalities issues is addressed

@bigludo7
Copy link
Collaborator Author

We may need to add support for 422 UNIDENTIFIABLE_DEVICE both this one and verification, but we can ammend that once Commonalities issues is addressed

Added - If you think it's too early I can remove but Rafal is working on the PR.

@bigludo7 bigludo7 requested a review from jlurien July 19, 2024 13:16
@bigludo7 bigludo7 merged commit bd42347 into main Jul 23, 2024
1 check passed
@bigludo7 bigludo7 deleted the bigludo7-patch-1 branch July 23, 2024 08:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Fall24 Meta-release Fall24
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Align Location Retrieval with guidelines for error scenarios
3 participants