I have this function:
error = (error, modelState, modalHeader, modalBody): ng.IPromise<any> => {
// function code here
In some cases the first parameter could be a string such as:
"problem"
in other cases it could be an object such as this:
{
"ErrorMessage":"END_TEST - Invalid TestID, Unauthorized Access or TestStatus is not Started or Paused",
"ErrorNumber":50001
}
Is there a way that I could detect if it is a string or an object?