aboutsummaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorrubenwardy <rw@rubenwardy.com>2020-04-11 14:51:10 +0100
committerrubenwardy <rw@rubenwardy.com>2020-04-11 14:51:10 +0100
commit39881e0d04ae814635804347709d2bc99289a917 (patch)
tree375e273d071ccfaddd1134ad96b978ab5fedff7f /app
parent39a09c5d9248d48422b4e8773add3b912e364ed1 (diff)
downloadcheatdb-39881e0d04ae814635804347709d2bc99289a917.tar.xz
Improve error messages
Diffstat (limited to 'app')
-rw-r--r--app/blueprints/github/__init__.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/app/blueprints/github/__init__.py b/app/blueprints/github/__init__.py
index 7477238..b61baac 100644
--- a/app/blueprints/github/__init__.py
+++ b/app/blueprints/github/__init__.py
@@ -92,7 +92,7 @@ def webhook():
github_url = "github.com/" + json["repository"]["full_name"]
package = Package.query.filter(Package.repo.like("%{}%".format(github_url))).first()
if package is None:
- return error(400, "Unknown package")
+ return error(400, "Could not find package, did you set the VCS repo in CDB correctly?")
# Get all tokens for package
possible_tokens = APIToken.query.filter_by(package=package).all()
@@ -118,7 +118,7 @@ def webhook():
break
if actual_token is None:
- return error(403, "Invalid authentication")
+ return error(403, "Invalid authentication, couldn't validate API token. Make sure to limit token to a package")
if not package.checkPerm(actual_token.owner, Permission.APPROVE_RELEASE):
return error(403, "Only trusted members can use webhooks")