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

fix: invalid name for Parse.Role throws incorrect error #1481

Merged
merged 4 commits into from
May 29, 2022

Conversation

dblythy
Copy link
Member

@dblythy dblythy commented May 17, 2022

New Pull Request Checklist

Issue Description

Creating a role with an invalid name does not throw an error, leaving the API to throw Error: name is required

Related issue: #1480

Approach

Validate role name on create

TODOs before merging

  • Add tests

@parse-github-assistant
Copy link

parse-github-assistant bot commented May 17, 2022

Thanks for opening this pull request!

  • 🎉 We are excited about your hands-on contribution!

@codecov
Copy link

codecov bot commented May 24, 2022

Codecov Report

Merging #1481 (4140d6e) into alpha (00190aa) will increase coverage by 0.00%.
The diff coverage is 100.00%.

@@           Coverage Diff           @@
##            alpha    #1481   +/-   ##
=======================================
  Coverage   99.94%   99.94%           
=======================================
  Files          61       61           
  Lines        5949     5954    +5     
  Branches     1357     1357           
=======================================
+ Hits         5946     5951    +5     
  Misses          3        3           
Impacted Files Coverage Δ
src/ParseRole.js 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 00190aa...4140d6e. Read the comment docs.

@mtrezza mtrezza linked an issue May 24, 2022 that may be closed by this pull request
4 tasks
@dblythy dblythy requested a review from a team May 25, 2022 02:25
Copy link
Member

@mtrezza mtrezza 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! Ready to merge?

@mtrezza mtrezza changed the title fix: throw error on invalid role name fix: invalid role name throws incorrect error May 29, 2022
@mtrezza mtrezza changed the title fix: invalid role name throws incorrect error fix: invalid name for Parse.Role throws incorrect error May 29, 2022
@dblythy
Copy link
Member Author

dblythy commented May 29, 2022

Yep!

@mtrezza mtrezza merged commit 8326a6f into parse-community:alpha May 29, 2022
parseplatformorg pushed a commit that referenced this pull request May 29, 2022
## [3.4.3-alpha.2](3.4.3-alpha.1...3.4.3-alpha.2) (2022-05-29)

### Bug Fixes

* invalid name for `Parse.Role` throws incorrect error ([#1481](#1481)) ([8326a6f](8326a6f))
@parseplatformorg
Copy link
Contributor

🎉 This change has been released in version 3.4.3-alpha.2

@parseplatformorg parseplatformorg added the state:released-alpha Released as alpha version label May 29, 2022
@dblythy dblythy deleted the invalid_name branch May 30, 2022 01:22
parseplatformorg pushed a commit that referenced this pull request Jun 18, 2022
## [3.4.3-beta.1](3.4.2...3.4.3-beta.1) (2022-06-18)

### Bug Fixes

* creating a Parse.File with base64 string fails for some file types ([#1467](#1467)) ([c07d6c9](c07d6c9))
* invalid name for `Parse.Role` throws incorrect error ([#1481](#1481)) ([8326a6f](8326a6f))
@parseplatformorg
Copy link
Contributor

🎉 This change has been released in version 3.4.3-beta.1

@parseplatformorg parseplatformorg added the state:released-beta Released as beta version label Jun 18, 2022
parseplatformorg pushed a commit that referenced this pull request Jul 2, 2022
## [3.4.3](3.4.2...3.4.3) (2022-07-02)

### Bug Fixes

* creating a Parse.File with base64 string fails for some file types ([#1467](#1467)) ([c07d6c9](c07d6c9))
* invalid name for `Parse.Role` throws incorrect error ([#1481](#1481)) ([8326a6f](8326a6f))
@parseplatformorg
Copy link
Contributor

🎉 This change has been released in version 3.4.3

@parseplatformorg parseplatformorg added the state:released Released as stable version label Jul 2, 2022
jpgupta pushed a commit to jpgupta/Parse-SDK-JS-UUID-Update that referenced this pull request Oct 24, 2022
## [3.4.3](parse-community/Parse-SDK-JS@3.4.2...3.4.3) (2022-07-02)

### Bug Fixes

* creating a Parse.File with base64 string fails for some file types ([parse-community#1467](parse-community#1467)) ([c07d6c9](parse-community@c07d6c9))
* invalid name for `Parse.Role` throws incorrect error ([parse-community#1481](parse-community#1481)) ([8326a6f](parse-community@8326a6f))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
state:released Released as stable version state:released-alpha Released as alpha version state:released-beta Released as beta version
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Cannot create role with : in name
3 participants