File tree 2 files changed +4
-5
lines changed
2 files changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -154,7 +154,7 @@ export async function extractInfo(
154
154
// Then run the topic extractor
155
155
const userTopics = extractUserKeywords (
156
156
text ,
157
- JSON . parse ( request . body [ ' keywords' ] || { } ) ,
157
+ JSON . parse ( request . body . keywords || '{}' ) ,
158
158
)
159
159
// Add the topics to the list
160
160
for ( const topic of userTopics ) {
@@ -175,9 +175,7 @@ export async function extractInfo(
175
175
} ,
176
176
} )
177
177
} catch ( error ) {
178
- Logger . error (
179
- `controller.data.extractInfo: caught error: ${ json ( error ) } ` ,
180
- )
178
+ Logger . error ( `controller.data.extractInfo: caught error: ${ error } ` )
181
179
// If an error is caught, forward it to the error handler
182
180
next ( error )
183
181
}
Original file line number Diff line number Diff line change @@ -99,7 +99,8 @@ export default function errorHandler(
99
99
} )
100
100
} else {
101
101
// Log it
102
- Logger . error ( `middleware.error: server crash - ${ json ( error ) } ` )
102
+ Logger . error ( `middleware.error: server crash - ${ error } ` )
103
+ console . error ( error )
103
104
// Else the server has crashed, return an internalServerError
104
105
response . status ( 500 ) . json ( {
105
106
code : 500 ,
You can’t perform that action at this time.
0 commit comments