uccess) { if ($response->header('content-type') eq 'application/json') { my $content = from_json($response->decoded_content); $error = $content->{error};