nextcloud / neon

A framework for building convergent cross-platform Nextcloud clients using Flutter.
Other
123 stars 29 forks source link

fix(nextcloud)!: Throw DynamiteStatusCodeExceptions for invalid WebDAV status codes #2475

Closed provokateurin closed 2 weeks ago

provokateurin commented 3 weeks ago

Fixes https://github.com/nextcloud/neon/issues/2307

codecov[bot] commented 3 weeks ago

Codecov Report

Attention: Patch coverage is 63.79310% with 21 lines in your changes missing coverage. Please review.

Project coverage is 30.29%. Comparing base (970ad83) to head (801599c). Report is 12 commits behind head on main.

Files with missing lines Patch % Lines
...es/nextcloud/lib/src/api/webdav/webdav_client.dart 63.79% 21 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #2475 +/- ## ======================================= Coverage 30.29% 30.29% ======================================= Files 352 352 Lines 124360 124389 +29 ======================================= + Hits 37671 37680 +9 - Misses 86689 86709 +20 ``` | [Flag](https://app.codecov.io/gh/nextcloud/neon/pull/2475/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=nextcloud) | Coverage Δ | | *Carryforward flag | |---|---|---|---| | [account_repository](https://app.codecov.io/gh/nextcloud/neon/pull/2475/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=nextcloud) | `98.77% <ø> (ø)` | | | | [cookie_store](https://app.codecov.io/gh/nextcloud/neon/pull/2475/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=nextcloud) | `99.48% <ø> (ø)` | | Carriedforward from [970ad83](https://app.codecov.io/gh/nextcloud/neon/commit/970ad83b32eea35113dfed16bb66258b443227ed?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=nextcloud) | | [dashboard_app](https://app.codecov.io/gh/nextcloud/neon/pull/2475/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=nextcloud) | `96.05% <ø> (ø)` | | | | [dynamite](https://app.codecov.io/gh/nextcloud/neon/pull/2475/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=nextcloud) | `31.08% <ø> (ø)` | | Carriedforward from [970ad83](https://app.codecov.io/gh/nextcloud/neon/commit/970ad83b32eea35113dfed16bb66258b443227ed?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=nextcloud) | | [dynamite_end_to_end_test](https://app.codecov.io/gh/nextcloud/neon/pull/2475/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=nextcloud) | `61.69% <ø> (ø)` | | Carriedforward from [970ad83](https://app.codecov.io/gh/nextcloud/neon/commit/970ad83b32eea35113dfed16bb66258b443227ed?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=nextcloud) | | [dynamite_runtime](https://app.codecov.io/gh/nextcloud/neon/pull/2475/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=nextcloud) | `85.40% <ø> (ø)` | | Carriedforward from [970ad83](https://app.codecov.io/gh/nextcloud/neon/commit/970ad83b32eea35113dfed16bb66258b443227ed?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=nextcloud) | | [neon_dashboard](https://app.codecov.io/gh/nextcloud/neon/pull/2475/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=nextcloud) | `96.05% <ø> (ø)` | | Carriedforward from [970ad83](https://app.codecov.io/gh/nextcloud/neon/commit/970ad83b32eea35113dfed16bb66258b443227ed?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=nextcloud) | | [neon_framework](https://app.codecov.io/gh/nextcloud/neon/pull/2475/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=nextcloud) | `57.10% <ø> (ø)` | | | | [neon_http_client](https://app.codecov.io/gh/nextcloud/neon/pull/2475/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=nextcloud) | `96.69% <ø> (ø)` | | | | [neon_notifications](https://app.codecov.io/gh/nextcloud/neon/pull/2475/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=nextcloud) | `100.00% <ø> (ø)` | | Carriedforward from [970ad83](https://app.codecov.io/gh/nextcloud/neon/commit/970ad83b32eea35113dfed16bb66258b443227ed?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=nextcloud) | | [neon_talk](https://app.codecov.io/gh/nextcloud/neon/pull/2475/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=nextcloud) | `99.45% <ø> (ø)` | | Carriedforward from [970ad83](https://app.codecov.io/gh/nextcloud/neon/commit/970ad83b32eea35113dfed16bb66258b443227ed?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=nextcloud) | | [nextcloud](https://app.codecov.io/gh/nextcloud/neon/pull/2475/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=nextcloud) | `25.90% <63.79%> (+<0.01%)` | :arrow_up: | | | [notifications_app](https://app.codecov.io/gh/nextcloud/neon/pull/2475/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=nextcloud) | `100.00% <ø> (ø)` | | | | [sort_box](https://app.codecov.io/gh/nextcloud/neon/pull/2475/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=nextcloud) | `90.90% <ø> (ø)` | | Carriedforward from [970ad83](https://app.codecov.io/gh/nextcloud/neon/commit/970ad83b32eea35113dfed16bb66258b443227ed?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=nextcloud) | | [talk_app](https://app.codecov.io/gh/nextcloud/neon/pull/2475/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=nextcloud) | `99.09% <ø> (ø)` | | | *This pull request uses carry forward flags. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=nextcloud) to find out more. | [Files with missing lines](https://app.codecov.io/gh/nextcloud/neon/pull/2475?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=nextcloud) | Coverage Δ | | |---|---|---| | [...es/nextcloud/lib/src/api/webdav/webdav\_client.dart](https://app.codecov.io/gh/nextcloud/neon/pull/2475?src=pr&el=tree&filepath=packages%2Fnextcloud%2Flib%2Fsrc%2Fapi%2Fwebdav%2Fwebdav_client.dart&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=nextcloud#diff-cGFja2FnZXMvbmV4dGNsb3VkL2xpYi9zcmMvYXBpL3dlYmRhdi93ZWJkYXZfY2xpZW50LmRhcnQ=) | `87.84% <63.79%> (-11.50%)` | :arrow_down: | ... and [1 file with indirect coverage changes](https://app.codecov.io/gh/nextcloud/neon/pull/2475/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=nextcloud)
provokateurin commented 3 weeks ago

Maybe we should wait with any refactors in that regard until we've decided on how we tackle other webdav based clients.

I think any refactor to support CalDAV and CardDAV will need this even more as the clients get even more different from the generated ones by extending the base DAV client in some form (e.g. polymorphism or some other way).

But yeah I can drop it from here as it is not necessary for the second commit and only an internal refactor that isn't breaking anyone so it can be done at any point.