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

Throw error when SP URL is null. Closes #6012 #6044

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

Conversation

Saurabh7019
Copy link
Contributor

Closes #6012

@Saurabh7019 Saurabh7019 marked this pull request as ready for review May 10, 2024 08:59
@milanholemans
Copy link
Contributor

Thank you @Saurabh7019, we'll review it ASAP!

src/utils/validation.ts Outdated Show resolved Hide resolved
@waldekmastykarz waldekmastykarz marked this pull request as draft May 15, 2024 09:01
@Saurabh7019 Saurabh7019 marked this pull request as ready for review May 15, 2024 09:32
@milanholemans milanholemans self-assigned this May 19, 2024
if (!url) {
return false;
if (typeof url !== 'string') {
return 'URL must be a string';
Copy link
Contributor

Choose a reason for hiding this comment

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

To keep it more in line with the other error, I suggest that we rephrase it a bit to "SharePoint Online site URL must be a string."
Also, let's end the error message with a period.
For the other error that is already there, could we add a period there as well? And maybe let's encapsulate the url value with single quotes to make it clearer.

@Saurabh7019 Saurabh7019 marked this pull request as ready for review May 21, 2024 07:16
Copy link
Contributor

@milanholemans milanholemans left a comment

Choose a reason for hiding this comment

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

Nothing more to add!

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.

Throw error when SP URL is null
3 participants