smartcar / java-sdk

Java client SDK for the Smartcar API.
https://smartcar.github.io/java-sdk
MIT License
20 stars 20 forks source link

Fix: smartcar factory bug #65

Closed adolfoportilla closed 5 years ago

adolfoportilla commented 5 years ago

Description: When an error gets returned from oem_auth, it does not contain message, it has error_description. Since we were doing Object.get("message").getAsString() it was throwing a null exception error.

Solution: Check for message or error_description before converting to a string to avoid throwing a null exception error.

codecov[bot] commented 5 years ago

Codecov Report

Merging #65 into master will decrease coverage by 0.5%. The diff coverage is 0%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master      #65      +/-   ##
============================================
- Coverage     47.74%   47.23%   -0.51%     
  Complexity       55       55              
============================================
  Files            20       20              
  Lines           465      470       +5     
  Branches         20       23       +3     
============================================
  Hits            222      222              
- Misses          237      242       +5     
  Partials          6        6
Flag Coverage Δ Complexity Δ
#integration 45.74% <0%> (-0.5%) 55 <0> (ø)
#test 6.17% <0%> (-0.07%) 5 <0> (ø)
Impacted Files Coverage Δ Complexity Δ
.../main/java/com/smartcar/sdk/SmartcarException.java 0% <0%> (ø) 0 <0> (ø) :arrow_down:

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 af422d8...6391ccd. Read the comment docs.