File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 13531353 name : KorifiError
13541354 http_code : 500
13551355 message : " %s"
1356+
1357+ 420001 :
1358+ name : DeserializationError
1359+ http_code : 500
1360+ message : " %s"
Original file line number Diff line number Diff line change @@ -7,7 +7,12 @@ def serializes_via_json(accessor_method_name)
77 string = send ( "#{ accessor_method_name } _without_serialization" )
88 return if string . blank?
99
10- MultiJson . load string
10+ begin
11+ MultiJson . load string
12+ rescue MultiJson ::ParseError
13+ error = "Failed to deserialize #{ guid } for object type #{ self . class } . Trying to deserialize #{ string } . You may have to delete and recreate the object"
14+ raise CloudController ::Errors ::ApiError . new_from_details ( 'DeserializationError' , error )
15+ end
1116 end
1217 alias_method "#{ accessor_method_name } _without_serialization" , accessor_method_name
1318 alias_method accessor_method_name , "#{ accessor_method_name } _with_serialization"
You can’t perform that action at this time.
0 commit comments