Currently if the function does not exist, it throws the `FunctionDoesNotExistException` which has to be caught separately. Instead, it should probably return the error dictionary so it can be handled in the same way as if the function itself errored.