Skip to content

Conversation

danielh-official
Copy link
Contributor

  • add assertions for exception codes
  • change the FiveamCode\LaravelNotionApi\Exceptions\NotionException::instance method to use $payload['responseData']['status'] field if it exists in exception code. 0, otherwise.

Francesco Schirinzi and others added 4 commits November 15, 2022 21:42
…ata" array that contains "status"

if exists, the status is passed as the code for the NotionException. Otherwise, 0
…sure that http status codes are being passed
@what-the-diff
Copy link

what-the-diff bot commented Dec 18, 2022

  • Added exception code to NotionException
  • Updated tests for new functionality

@danielh-official
Copy link
Contributor Author

@johguentner Do you need any more testing to be done on this, or is it no longer compatible with the "dev" branch? I noticed there was some movement towards adopting PEST.

@danielh-official
Copy link
Contributor Author

@johguentner Also, just a slight nitpick, but I was having trouble getting my PhpStorm to recognize the "Notion" facade. Kept throwing an error wanting to import the full "Notion" class, but if I did that, I would get an error like "$this not used in right context" when running a test.

The main suggestion for that issue was using https://github.com/barryvdh/laravel-ide-helper but that package only works for full Laravel projects that have an artisan file in their root. Packages don't use artisan, so I can't generate helper comments.

It's not a big deal, but something to keep in mind if you plan to use PhpStorm to develop.

@johguentner
Copy link
Member

@johguentner Do you need any more testing to be done on this, or is it no longer compatible with the "dev" branch? I noticed there was some movement towards adopting PEST.

Thank you @danielh-official for your PR.

No prob (since there are no immediate changes necessary for the tests in regards to PEST) !
We appreciate your thoughts here. To Di an me the PR looks all good. We want to release 1.0.0 quite soon.
However we won't do any major work until the start of the new year, so a full check and merching will be done in about 3 weeks. 🌲🌲🌲

As long as there is no major stuff in here - which it does not look like - we will polish it and release it with 1.0.0. ✅

@johguentner johguentner added the enhancement New feature or request label Jan 26, 2023
@johguentner johguentner added this to the 🌳 v1.0.0 milestone Jan 26, 2023
@johguentner johguentner requested a review from mechelon February 2, 2023 14:04
@johguentner
Copy link
Member

johguentner commented Feb 2, 2023

The implementation and all the tests look good!

If that's alright with you @mechelon I'll push this into dev for prep of release v1.0.0 ?

@johguentner johguentner merged commit 80f38df into 5am-code:dev Feb 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants