@promptbook/remote-server 0.89.0-7 → 0.89.0-8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/esm/index.es.js
CHANGED
|
@@ -33,7 +33,7 @@ const BOOK_LANGUAGE_VERSION = '1.0.0';
|
|
|
33
33
|
* @generated
|
|
34
34
|
* @see https://github.com/webgptorg/promptbook
|
|
35
35
|
*/
|
|
36
|
-
const PROMPTBOOK_ENGINE_VERSION = '0.89.0-
|
|
36
|
+
const PROMPTBOOK_ENGINE_VERSION = '0.89.0-8';
|
|
37
37
|
/**
|
|
38
38
|
* TODO: string_promptbook_version should be constrained to the all versions of Promptbook engine
|
|
39
39
|
* Note: [💞] Ignore a discrepancy between file name and entity name
|
|
@@ -6935,8 +6935,19 @@ function startRemoteServer(options) {
|
|
|
6935
6935
|
const username = request.body.username;
|
|
6936
6936
|
const password = request.body.password;
|
|
6937
6937
|
const appId = request.body.appId;
|
|
6938
|
-
const identification = await login({
|
|
6939
|
-
|
|
6938
|
+
const { isSuccess, error, message, identification } = await login({
|
|
6939
|
+
username,
|
|
6940
|
+
password,
|
|
6941
|
+
appId,
|
|
6942
|
+
rawRequest: request,
|
|
6943
|
+
rawResponse: response,
|
|
6944
|
+
});
|
|
6945
|
+
response.status(201).send({
|
|
6946
|
+
isSuccess,
|
|
6947
|
+
message,
|
|
6948
|
+
error: error ? serializeError(error) : undefined,
|
|
6949
|
+
identification,
|
|
6950
|
+
});
|
|
6940
6951
|
return;
|
|
6941
6952
|
}
|
|
6942
6953
|
catch (error) {
|
|
@@ -6944,7 +6955,11 @@ function startRemoteServer(options) {
|
|
|
6944
6955
|
throw error;
|
|
6945
6956
|
}
|
|
6946
6957
|
if (error instanceof AuthenticationError) {
|
|
6947
|
-
response.status(401).send({
|
|
6958
|
+
response.status(401).send({
|
|
6959
|
+
isSuccess: false,
|
|
6960
|
+
message: error.message,
|
|
6961
|
+
error: serializeError(error),
|
|
6962
|
+
});
|
|
6948
6963
|
}
|
|
6949
6964
|
console.warn(`Login function thrown different error than AuthenticationError`, {
|
|
6950
6965
|
error,
|