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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Properly validate incoming URL params and notify on failure #573

Open
4 tasks
ivan-aksamentov opened this issue Apr 17, 2020 · 5 comments
Open
4 tasks

Properly validate incoming URL params and notify on failure #573

ivan-aksamentov opened this issue Apr 17, 2020 · 5 comments
Labels
good first issue Good for newcomers help wanted Extra attention is needed IMPORTANT Take this immediately! s:ui Scope: related to user experience, user interface, usability, accessibility t:feat Type: request of a new feature, functionality, enchancement
Milestone

Comments

@ivan-aksamentov
Copy link
Member

馃檵 Feature Request

Current checks are somewhat sparse. Developer mistakes often snick into URLs.
We need to treat URLs as a proper I/O mechanism.

馃敠 Context

馃槸 Describe the feature

  • perform proper URL params validation and serialization using JSON schema tools
  • perform error checks on all stages
  • display an error message to the user in case of failure
  • it is desirable to make code as generic as possible in order it to be reusing for other I/O mechanisms (Local Storage, files etc.). One might reuse a large portion of data files validation that is currently on place.

馃捇 Examples

馃拋 Possible Solution

Related

@ivan-aksamentov ivan-aksamentov added t:feat Type: request of a new feature, functionality, enchancement help wanted Extra attention is needed s:ui Scope: related to user experience, user interface, usability, accessibility IMPORTANT Take this immediately! labels Apr 17, 2020
@ivan-aksamentov ivan-aksamentov added this to the 1.2 milestone Apr 17, 2020
@ivan-aksamentov ivan-aksamentov mentioned this issue Apr 17, 2020
36 tasks
@ivan-aksamentov ivan-aksamentov modified the milestones: 1.2, 1.3 May 1, 2020
@ivan-aksamentov ivan-aksamentov added the good first issue Good for newcomers label May 11, 2020
@joyendra
Copy link

Hi, I'm new to open source. I wanted to take up this project. Can you help me get started with it?

@ivan-aksamentov
Copy link
Member Author

Hi @joyendra. Sure. Do you have difficulties in something particular?

Make sure you follow the Developer's guide and are able to run the application locally. Create a git branch, let' say "feat/url-validation" and start coding.

This particular issue is a bit tricky, but here are the steps to reproduce it:

  • open the app in the browser
  • go to "Sharing" dialog (last button in the button array in results section) and copy the URL
  • now edit this URL manually to produce an obvious error: syntactic (e.g. remove one of the parentheses) or numeric (e.g. make population negative)
  • try to navigate to this URL
  • the app will either show a generic error page or will completely ignore the error, without letting the user know what's happening

I would like the URL parser's and schema validator's errors to propagate to the user interface, such that user would receive a meaningful information in order to be able to resolve the problem.

Let me know if you have further questions.

@joyendra
Copy link

Hey,
So when I do yarn install, I encounter this error every time.
[2/4] Fetching packages...
error An unexpected error occurred: "C:\Users\joyrb\Documents\GitHub\covid19_scenarios\.cache\yarn\v6\npm-@jest-types-25.5.0-4d6a4793f7b9599fc3680877b856a97dbccf2a9d-integrity\node_modules\@jest\types\.yarn-metadata.json: Unexpected end of JSON input".

@ivan-aksamentov
Copy link
Member Author

@joyendra Something broke in your .cache directory? Try to delete it and run yarn install again

@joyendra
Copy link

Yup, figured it out.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers help wanted Extra attention is needed IMPORTANT Take this immediately! s:ui Scope: related to user experience, user interface, usability, accessibility t:feat Type: request of a new feature, functionality, enchancement
Projects
None yet
Development

No branches or pull requests

2 participants