Skip to content

Conversation

@vasdhara
Copy link
Contributor

@vasdhara vasdhara commented Jun 4, 2020

closes #1722

Is this what was required for the feature request? Please let me know if I have missed anything. A first-time contributor so slightly overwhelmed.

@coveralls
Copy link

coveralls commented Jun 4, 2020

Coverage Status

Coverage decreased (-0.004%) to 97.058% when pulling 9c4bb9d on vasdhara:feature/param-added-to-throwIfNotFoundError into 5060140 on Vincit:master.


| Argument | Type | Description |
| -------- | ------ | -------------------------------- |
| data | object | optional object with custom data |
Copy link
Collaborator

@koskimas koskimas Jul 7, 2020

Choose a reason for hiding this comment

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

There's no way for people to use this based on this documentation. Where does this data go? What properties can it have? How are different properties treated (like the special case for message). The example below helps, but it only provides an example for the message. The rest of the data is more useful. You should never detect the error using the message in the client or further down in the request handing. You should use some other property, which you could provide using the data. An example/explanation of that would be useful.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I've updated the description and added a custom type example, is that sufficient?

Copy link
Collaborator

Choose a reason for hiding this comment

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

That's excellent!

});

it('.throwIfNotFound() with empty result', done => {
it('custom .throwIfNotFound() with empty result', done => {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Why did you add the word custom here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

was a typo, reverted

@koskimas
Copy link
Collaborator

koskimas commented Jul 7, 2020

Hi @vasdhara! Thank you so much for your contribution! I added a couple of comments. You also need to update the typescript typings.

@vasdhara vasdhara force-pushed the feature/param-added-to-throwIfNotFoundError branch from 7dd721d to 9c4bb9d Compare July 8, 2020 09:23
@vasdhara
Copy link
Contributor Author

vasdhara commented Jul 8, 2020

@koskimas thanks. added fixes. Also, added a new interface for throwIfNotFound typings, since I couldn't find a previously written interface that could be reused in this case.

@koskimas koskimas merged commit 1fdd5a6 into Vincit:master Jul 9, 2020
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.

[Feature Request] Optional message param to throwIfNotFound

3 participants