changeset 4266:b43c6d614d22

mod_adhoc_oauth2_client: Fix adhoc status on error There's no 'error' status, it's 'canceled' and an error message.
author Kim Alvefur <zash@zash.se>
date Sun, 22 Nov 2020 16:17:24 +0100
parents 7b4a73364363
children 43284437c5ed
files mod_adhoc_oauth2_client/mod_adhoc_oauth2_client.lua
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/mod_adhoc_oauth2_client/mod_adhoc_oauth2_client.lua	Sun Nov 22 01:55:42 2020 +0100
+++ b/mod_adhoc_oauth2_client/mod_adhoc_oauth2_client.lua	Sun Nov 22 16:17:24 2020 +0100
@@ -47,7 +47,7 @@
 
 	local ok, err = errors.coerce(clients:set(creator, client_id, client));
 	module:log("info", "OAuth2 client %q created by %s", client_id, data.from);
-	if not ok then return {status = "error"; error = {message = err}}; end
+	if not ok then return {status = "canceled"; error = {message = err}}; end
 
 	return {status = "completed"; result = {layout = client_created; values = {client_id = client.client_id; client_secret = client_secret}}};
 end