Changeset

5469:03f393d572fe

mod_http_oauth2: Add human-readable error messages
author Kim Alvefur <zash@zash.se>
date Thu, 18 May 2023 13:03:09 +0200
parents 5468:14b5446e22e1
children 5470:40c990159006
files mod_http_oauth2/mod_http_oauth2.lua
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/mod_http_oauth2/mod_http_oauth2.lua	Thu May 18 12:57:23 2023 +0200
+++ b/mod_http_oauth2/mod_http_oauth2.lua	Thu May 18 13:03:09 2023 +0200
@@ -681,11 +681,11 @@
 	local request = event.request;
 
 	if not request.url.query then
-		return error_response(request, oauth_error("invalid_request"));
+		return error_response(request, oauth_error("invalid_request", "Missing query parameters"));
 	end
 	local params = http.formdecode(request.url.query);
 	if not params then
-		return error_response(request, oauth_error("invalid_request"));
+		return error_response(request, oauth_error("invalid_request", "Invalid query parameters"));
 	end
 
 	if not params.client_id then return oauth_error("invalid_request", "missing 'client_id'"); end