Skip to content

Comments

add partial sharing response example and schema#154

Open
butonic wants to merge 1 commit intomainfrom
permission-error
Open

add partial sharing response example and schema#154
butonic wants to merge 1 commit intomainfrom
permission-error

Conversation

@butonic
Copy link
Contributor

@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

Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
displayName: "Albert Einstein"
error:
- code: notAllowed
message: Account verification needed to unblock sending emails.
Copy link
Contributor 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