-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
[notification hubs] Error on parsing XML in response when sending notification #25914
Comments
### Packages impacted by this PR - @azure/notification-hubs ### Issues associated with this PR - #25914 ### Describe the problem that is addressed by this PR Updates code to fix the error code parsing for XML. ### What are the possible designs available to address the problem? If there are more than one possible design, why was the one in this PR chosen? ### Are there test cases added in this PR? _(If not, why?)_ ### Provide a list of related PRs _(if any)_ ### Command used to generate this PR:**_(Applicable only to SDK release request PRs)_ ### Checklists - [x] Added impacted package name to the issue description - [ ] Does this PR needs any fixes in the SDK Generator?** _(If so, create an Issue in the [Autorest/typescript](https://github.com/Azure/autorest.typescript) repository and link it here)_ - [x] Added a changelog (if necessary)
@hmaskat17 does this continue to happen? I've published a new version which properly parses the error XML, however, this does not change the behavior where the response should be |
@hmaskat17 can you run this sample to send to FCM Direct Send and let me know if it doesn't work for you? |
Hi @hmaskat17. Thank you for opening this issue and giving us the opportunity to assist. To help our team better understand your issue and the details of your scenario please provide a response to the question asked above or the information requested above. This will help us more accurately address your issue. |
Hi @hmaskat17, we're sending this friendly reminder because we haven't heard back from you in 7 days. We need more information about this issue to help address it. Please be sure to give us your input. If we don't hear back from you within 14 days of this comment the issue will be automatically closed. Thank you! |
@mpodwysocki I tested the |
@hmaskat17 am I correct in understanding the issue has been resolved? Please let us know if something is still amiss. |
Hi @hmaskat17. Thank you for opening this issue and giving us the opportunity to assist. We believe that this has been addressed. If you feel that further discussion is needed, please add a comment with the text "/unresolve" to remove the "issue-addressed" label and continue the conversation. |
@xirzec Yes, the issue has been resolved. |
Hi @hmaskat17, since you haven’t asked that we |
Describe the bug
When creating a notification with
createFcmLegacyNotification
and then sending it withsendNotification
, aRestError
is thrown stating that the response body could not be parsed: "Unexpected token < in JSON ..... while parsing the response body".The response body is in XML format. Sending the notification automatically adds
content-type
value toapplication/json
even though the response is XML and there is no way to change the content type's value.To Reproduce
Steps to reproduce the behavior:
createFcmLegacyNotification
sendNotification
Expected behavior
The SDK should be able to parse the response correctly.
The text was updated successfully, but these errors were encountered: