Skip to content
This repository was archived by the owner on Feb 28, 2026. It is now read-only.

add failsafe_deserialize - #232

Merged
iscai-msft merged 4 commits into
masterfrom
failsafe_error_deserialization
Jan 25, 2021
Merged

add failsafe_deserialize#232
iscai-msft merged 4 commits into
masterfrom
failsafe_error_deserialization

Conversation

@iscai-msft

Copy link
Copy Markdown
Member

No description provided.

pass # Target is not a Model, no classify
return target, target.__class__.__name__

def failsafe_deserialize(self, target_obj, response_data, content_type=None):

Copy link
Copy Markdown
MemberAuthor

Choose a reason for hiding this comment

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

made the signature the same as __call__, since I wanted calling failsafe_deserialize the same as calling deserializer()

Comment threadmsrest/serialization.py Outdated
:param str/dict data: The response data to deseralize.
"""
try:
data = self._unpack_content(response_data, content_type)

Copy link
Copy Markdown
MemberAuthor

Choose a reason for hiding this comment

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

added this content unpacking line, since call does content unpacking of the data as well, and as this method doesn't enter __call__, added this code here

@codecov-io

Codecov (codecov-io) commented Jan 22, 2021

Copy link
Copy Markdown

Codecov Report

Merging #232 (4cc411d) into master (209fa61) will increase coverage by 0.73%.
The diff coverage is 100.00%.

Impacted file tree graph

@@ Coverage Diff @@## master #232 +/- ##
==========================================
+ Coverage 86.32% 87.05% +0.73% 
==========================================
Files 25 25 Lines 2749 2835 +86 ==========================================
+ Hits 2373 2468 +95 + Misses 376 367 -9 
Impacted FilesCoverage Δ
msrest/serialization.py92.66% <100.00%> (+1.36%)⬆️
msrest/version.py100.00% <100.00%> (ø)
msrest/pipeline/universal.py95.19% <0.00%> (+0.96%)⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 209fa61...8896438. Read the comment docs.

@iscai-msft
iscai-msft merged commit 192486b into masterJan 25, 2021
@iscai-msft
iscai-msft deleted the failsafe_error_deserialization branch January 25, 2021 16:27
Sign up for freeto subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

@iscai-msft@codecov-io@lmazuel