feat(image controller): reworked the error handling