Just showing an error to the user that you don't know what means is definitely not a good idea.
Imagine you are using an app and when you try to refresh or perform an action you get a message like "Error: BAD GATEWAY 24231". This information can be useful for you as a developer but not so much for the user.
You should always aim to show an error message that the user can act on. For example, would be much useful if you just do:
self.showAlert(message: "Operation Failed. Please try again.")
In this case the user has something to do other than wondering what "BAD GATEWAY" means (and even if they know, is unlikely they can do something about it).
That said, it really depends on the domain of your app. You might want to check for specific errors and perform different actions or show different messages.
For example, if the error is about an item not being found, you can display an empty view to the user or even telling them "The item you are looking for does not exists."
But displaying an error that you don't really control is more likely a bad idea (unless in development or beta testing and you have instructed your users to send you the error, but even in those cases there are better mechanisms).