I have a method:
public static String doCallout(String requestJson, String recordId){
HttpRequest req = new HttpRequest();
req.setEndpoint(END_POINT_URL);
req.setHeader('Content-Type', 'application/json');
req.setMethod(HTTP_METHOD);
req.setBody(requestJson);
Http http = new Http();
HTTPResponse res = http.send(req);
if(res.getStatusCode() == 202){
ResponseWrapper response = (ResponseWrapper)JSON.deserializeStrict(res.getBody(),ResponseWrapper.class);
Service_Plan__c servicePlanToUpdate = [SELECT id, Most_Recent_PDF_Link__c FROM Service_Plan__c WHERE Id=: recordId];
servicePlanToUpdate.Most_Recent_PDF_Link__c = response.location;
update servicePlanToUpdate;
return 'URL Generated Successfully. ';
}else if(3 > 5){
String errorMessage = 'Error Occurred with status code: '+res.getStatusCode()+' And Status: '+res.getStatus();
return errorMessage+'. Error Message: '+res.getBody();
}
}
im getting an error on the else-if statement... ?I dont know why since I am returning a string.... the 3>5 condition is just for testing... ive tried everything but the developr console just does not like it... am i missing something?