aboutsummaryrefslogtreecommitdiff
path: root/mal
diff options
context:
space:
mode:
Diffstat (limited to 'mal')
-rw-r--r--mal/status.go12
1 files changed, 9 insertions, 3 deletions
diff --git a/mal/status.go b/mal/status.go
index 06d7773..422a838 100644
--- a/mal/status.go
+++ b/mal/status.go
@@ -19,12 +19,18 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
package mal
import (
- "log"
+ "fmt"
+ "os"
)
func SetStatus(animeId int, status string) {
- resp, _ := userAnimeClient.SetStatus(animeId, status)
+ resp, err := userAnimeClient.SetStatus(animeId, status)
+ if err != nil {
+ fmt.Println("Error while parsing status:", err.Error())
+ os.Exit(1)
+ }
if resp.Error != "" {
- log.Println("MyAnimeList reported error on SetStatus", resp.Error, resp.Message)
+ fmt.Println("MyAnimeList reported error on SetStatus", resp.Error, resp.Message)
+ os.Exit(1)
}
}