From 27b2aea827fe86ba4c3e7f03a085acbf565e8281 Mon Sep 17 00:00:00 2001 From: Wolfgang Hottgenroth Date: Mon, 22 Feb 2021 17:30:41 +0100 Subject: [PATCH] msg in error --- monatliche-forderung-eintragen.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/monatliche-forderung-eintragen.py b/monatliche-forderung-eintragen.py index 3c29a25..ace5772 100755 --- a/monatliche-forderung-eintragen.py +++ b/monatliche-forderung-eintragen.py @@ -3,12 +3,12 @@ import requests import datetime -class ResourceNotFoundException(Exception): pass +class ServerException(Exception): pass def postJson(url): resp = requests.post(url) if resp.status_code != 202: - raise ResourceNotFoundException("URL: {}, Code: {}".format(url, resp.status_code)) + raise ServerException("URL: {}, Code: {}, Msg: {}".format(url, resp.status_code, resp.text)) return resp.json()