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

add partial sharing response example and schema #154

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

butonic
Copy link
Member

@butonic butonic commented Dec 21, 2023

We should have a way to return errors for partially successful sharing requests. Follows ms graph https://learn.microsoft.com/en-us/graph/api/driveitem-invite?view=graph-rest-beta&tabs=http#partial-success-response

displayName: "Albert Einstein"
error:
- code: notAllowed
message: Account verification needed to unblock sending emails.
Copy link
Member Author

@butonic butonic Dec 21, 2023

Choose a reason for hiding this comment

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

it is interesting to see that ms graph has two more properties:
one that contains a localized message that can be shown to the end user:

"localizedMessage": "Kontobestätigung erforderlich, um das Senden von E-Mails zu entsperren.",

Nothing for this PR, but this is how they move error localization to the server side.

And one that I assume is intendet to educate the end user.

"fixItUrl":"http://g.live.com/8SESkydrive/VerifyAccount",

In this case it is a link to the login page of onedrive.

Interestingly they have defined a list of errors clients should expect: https://learn.microsoft.com/en-us/graph/api/driveitem-invite?view=graph-rest-beta&tabs=http#sendnotification-errors

It seems they are running into exactly the same problem, even when they are 'just' trying to send out email and we are trying to persist perminssions in the share manager.

Oh and:

Note: The service can add new error codes or stop returning old ones at any time.

@butonic butonic self-assigned this Dec 21, 2023
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.

1 participant