[PR #2541] [MERGED] [PM-2232] Fix Json response check #3626

Closed
opened 2025-11-26 23:35:22 -06:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/bitwarden/android/pull/2541
Author: @fedemkr
Created: 5/26/2023
Status: Merged
Merged: 6/1/2023
Merged by: @fedemkr

Base: masterHead: PM-2232-update-error-netacea


📝 Commits (2)

  • b795d1e PM-2232 Fix api response not being read as string because the content was not being considered json when it was indeed. Now Netacea messages are shown on the UI.
  • 313190d Merge branch 'master' into PM-2232-update-error-netacea

📊 Changes

1 file changed (+14 additions, -1 deletions)

View changed files

📝 src/Core/Services/ApiService.cs (+14 -1)

📄 Description

Type of change

  • Bug fix
  • New feature development
  • Tech debt (refactoring, code cleanup, dependency upgrades, etc)
  • Build/deploy pipeline (DevOps)
  • Other

Objective

Fix response check where in some kind of responses the ContentType property of Headers is not being filled properly. So add an additional check against the headers enumeration directly.

Code changes

  • ApiService: Added new check to see if the content of a response is media type is Json looking into the headers enumeration directly.

Before you submit

  • Please check for formatting errors (dotnet format --verify-no-changes) (required)
  • Please add unit tests where it makes sense to do so (encouraged but not required)
  • If this change requires a documentation update - notify the documentation team
  • If this change has particular deployment requirements - notify the DevOps team

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/bitwarden/android/pull/2541 **Author:** [@fedemkr](https://github.com/fedemkr) **Created:** 5/26/2023 **Status:** ✅ Merged **Merged:** 6/1/2023 **Merged by:** [@fedemkr](https://github.com/fedemkr) **Base:** `master` ← **Head:** `PM-2232-update-error-netacea` --- ### 📝 Commits (2) - [`b795d1e`](https://github.com/bitwarden/android/commit/b795d1e9d211d99fa80fc75f062b0df1d8d5412d) PM-2232 Fix api response not being read as string because the content was not being considered json when it was indeed. Now Netacea messages are shown on the UI. - [`313190d`](https://github.com/bitwarden/android/commit/313190d6349c7fb5cf1d2a530d876b7336842d97) Merge branch 'master' into PM-2232-update-error-netacea ### 📊 Changes **1 file changed** (+14 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `src/Core/Services/ApiService.cs` (+14 -1) </details> ### 📄 Description ## Type of change - [X] Bug fix - [ ] New feature development - [ ] Tech debt (refactoring, code cleanup, dependency upgrades, etc) - [ ] Build/deploy pipeline (DevOps) - [ ] Other ## Objective <!--Describe what the purpose of this PR is. For example: what bug you're fixing or what new feature you're adding--> Fix response check where in some kind of responses the `ContentType` property of `Headers` is not being filled properly. So add an additional check against the headers enumeration directly. ## Code changes <!--Explain the changes you've made to each file or major component. This should help the reviewer understand your changes--> <!--Also refer to any related changes or PRs in other repositories--> * **ApiService:** Added new check to see if the content of a response is media type is Json looking into the headers enumeration directly. ## Before you submit - Please check for formatting errors (`dotnet format --verify-no-changes`) (required) - Please add **unit tests** where it makes sense to do so (encouraged but not required) - If this change requires a **documentation update** - notify the documentation team - If this change has particular **deployment requirements** - notify the DevOps team --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2025-11-26 23:35:22 -06:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/android#3626