File tree Expand file tree Collapse file tree 3 files changed +18
-16
lines changed
Expand file tree Collapse file tree 3 files changed +18
-16
lines changed Original file line number Diff line number Diff line change 1- app_id : 5af6e037cd7649a1baa7f8b222259f72
2- name : Funky Functions
1+ app_id : 6ce23f839c9f4b9d969a6fe104f01019
2+ name : functions-python
33description : " "
44logo : " "
55vendor : " "
@@ -140,8 +140,8 @@ functions:
140140 method : POST
141141 api_path : /log-event
142142 payload_type : " "
143- request_schema : " "
144- response_schema : " "
143+ request_schema : null
144+ response_schema : null
145145 workflow_integration :
146146 id : 8d5f38cfe6e54ddd8f5ba39058a83bda
147147 disruptive : false
@@ -165,8 +165,8 @@ functions:
165165 method : POST
166166 api_path : /hosts-query
167167 payload_type : " "
168- request_schema : " "
169- response_schema : " "
168+ request_schema : null
169+ response_schema : null
170170 workflow_integration :
171171 id : f1f261a5815549d48489d4af0d9a52a7
172172 disruptive : false
@@ -181,12 +181,12 @@ functions:
181181 - id : 86c21f8136204c30bcddccfab707d939
182182 name : host-info
183183 config : null
184- description : host-info function
184+ description : Get Host Information
185185 path : functions/host-info
186186 environment_variables : {}
187187 handlers :
188188 - name : on_post
189- description : host-info function
189+ description : Get Host Information
190190 method : POST
191191 api_path : /host-info
192192 payload_type : " "
@@ -204,12 +204,12 @@ functions:
204204 - id : 86c21f8136204c30bcffccfab707d939
205205 name : user-management
206206 config : null
207- description : create-user function
207+ description : Create a User
208208 path : functions/user-management
209209 environment_variables : {}
210210 handlers :
211211 - name : on_post
212- description : create-user function
212+ description : Create a User
213213 method : POST
214214 api_path : /create-user
215215 payload_type : " "
Original file line number Diff line number Diff line change @@ -5355,7 +5355,7 @@ function Home() {
53555355
53565356 // Call the Hello function
53575357 const helloFunction = falcon.cloudFunction({
5358- name: 'Hello '
5358+ name: 'hello '
53595359 });
53605360 const response = await helloFunction.path('/hello').post({
53615361 name: name
@@ -5368,8 +5368,9 @@ function Home() {
53685368 // Set the greeting from the response
53695369 setGreeting(responseData.greeting);
53705370 } catch (error) {
5371- console.error('Error calling Hello function:', error);
5372- setError(`Error: ${error.message || 'Failed to get greeting'}`);
5371+ console.error('Error calling hello function:', error);
5372+ const errorMessages = error.errors?.map(err => err.message || String(err)).join(', ');
5373+ setError(`Error: ${errorMessages || 'Failed to get greeting'}`);
53735374 setGreeting(null);
53745375 } finally {
53755376 setLoading(false);
Original file line number Diff line number Diff line change @@ -27,7 +27,7 @@ function Home() {
2727
2828 // Call the Hello function
2929 const helloFunction = falcon . cloudFunction ( {
30- name : 'Hello '
30+ name : 'hello '
3131 } ) ;
3232
3333 const response = await helloFunction . path ( '/hello' )
@@ -42,8 +42,9 @@ function Home() {
4242 // Set the greeting from the response
4343 setGreeting ( responseData . greeting ) ;
4444 } catch ( error ) {
45- console . error ( 'Error calling Hello function:' , error ) ;
46- setError ( `Error: ${ error . message || 'Failed to get greeting' } ` ) ;
45+ console . error ( 'Error calling hello function:' , error ) ;
46+ const errorMessages = error . errors ?. map ( err => err . message || String ( err ) ) . join ( ', ' ) ;
47+ setError ( `Error: ${ errorMessages || 'Failed to get greeting' } ` ) ;
4748 setGreeting ( null ) ;
4849 } finally {
4950 setLoading ( false ) ;
You can’t perform that action at this time.
0 commit comments