Method to display loading when loading and text error when the api error
object model to be implemented