KalleV
5b6c6cdf5c
fix(cve-2023-29827): replace EJS with Handlebars to resolve security warning
...
Relates to: https://github.com/loopbackio/loopback-next/issues/9867
Signed-off-by: KalleV <kvirtaneva@gmail.com>
2023-11-12 17:32:11 +08:00
Miroslav Bajtoš
7b61bcd541
[SEMVER-MAJOR] Reword log messages for clarity
...
Before this commit, we logged messages saying "unhandled error". This
was often creating confusion for our users, it seems like the error
was not handled at all, when in fact it was caught by the configured
error handler and converted into a proper HTTP error response.
In this commit, I am changing the messaging to use "request failed"
instead.
While this change is not affecting application developers, it may
break tooling processing logs if the tool relies on a specific format
of error messages. To be safe, I am labelling this change as breaking.
Signed-off-by: Miroslav Bajtoš <mbajtoss@gmail.com>
2020-10-12 09:56:56 +02:00
Raymond Feng
bda981feb8
feat: add options.rootProperty for json/xml
...
Using `error` as the root property is a good default but we should
be able to use a different one or don't use it at all.
2020-06-23 10:05:24 -07:00
Miroslav Bajtoš
67fc40b78b
chore: update eslint & config to latest
...
Replace `var` with `const` and `let`.
Signed-off-by: Miroslav Bajtoš <mbajtoss@gmail.com>
2019-10-12 09:44:54 +02:00
dkrantsberg
4b3c802088
fix: handle Error objects with circular properties
2019-09-30 07:58:34 +02:00
Agnes Lin
589e432812
chore: update copyrights years
2019-05-09 08:51:57 -04:00
shimks
80ebf30cfa
Add type definition and writeErrorToResponse
2018-08-30 12:09:28 -04:00
shimks
7828534804
Allow safeFields to work with arrays
...
Co-authored-by: Miroslav Bajtos <mbajtoss@gmail.com>
2018-06-08 15:01:45 -04:00
shimks
b7b3961ff2
run lint
2018-06-07 12:47:21 -04:00
Zak Barbuto
0ce15b2d27
Undefined safeFields revert to data #71
2018-03-05 14:09:51 +10:30
Raj
4d973929c1
Add new option: negotiateContentType
...
The option controls whether response content type is negotiated with
the client and it's enabled by default.
2017-07-20 10:19:29 +02:00
Charlie Schliesser
f96e7433d8
Fix the order of arguments in the jsdoc comment.
2017-03-13 10:46:10 -05:00
Zak Barbuto
382fffc8b0
Add a machine-readable "code" property
...
Include `error.code` in 4xx responses.
2017-02-01 10:10:20 +01:00
Miroslav Bajtoš
461867de1d
Upgrade dependencies to their latest versions
...
Also:
- fix linting errors after upgrading eslint-config-loopback
- fix a bug discovered by eslint where uknown `?_format`
was throwing an unhandled error
2017-02-01 09:24:21 +01:00
Miroslav Bajtoš
936e2d4838
Stop adding safeFields to original options arg
2017-01-30 14:48:38 +01:00
Zak Barbuto
4e3f6eb6cc
Support options.safeFields
2017-01-30 13:51:34 +01:00
Ahmet Ozisik
06c53d1f73
xml support added
2017-01-09 19:01:52 +03:00
David Cheung
6c056a09a3
Globalize strong-error-handler
2016-08-17 19:16:14 -04:00
Loay
3c3df0aab5
Update eslint infrastructure
2016-08-17 17:04:07 -04:00
David Cheung
5646680e5e
HTML response for accepted headers
2016-06-14 12:04:32 -04:00
David Cheung
9f74606847
Remove statusCode from details in Array errors
...
This is to preserve behavior from strong-remoting rest adapter
2016-05-25 11:12:31 -04:00
David Cheung
ef72b5c0f1
Include err.message and err.name for debug data
...
err.message and err.name are not enumerable,
therefore needs to be explicited added to the data obj
2016-05-20 11:00:03 -04:00
David Cheung
cfde2a8bb0
Handle error from res.statusCode
2016-05-13 11:27:53 -04:00
Miroslav Bajtoš
225d35994b
Initial implementation
...
The response is always JSON
Options supported: log, debug
2016-05-13 13:10:53 +02:00