getErrorBody

function that takes a string as input and returns the ErrorBody of a given error message.

Return

: a json string that contains the ErrorBody

The function uses the Http.ktorConfigJson object to decode the input string as an ErrorBody object, and then it returns the code field of the object

Parameters

body

: a string that contains the error details.