Releases: leafo/lapis-exceptions
Releases · leafo/lapis-exceptions
v2.4.0
luarocks install lapis-exceptions
Changes
- Rewrite validation in
lapis.exceptions.flow
to use modern lapis tableshape validation - Write test for
lapis.exceptions.flow
- Update
ExceptionsFlow:find_exception_type
to return the exception type that was fetched - Add support for
search_label
filter parameter toExceptionsFlow:exception_types
- Add
delete
action toExceptionsFlow:update_exception
- Fix bug in
ExceptionTypes:create
where a manually provided status would not be converted to the enum value
Misc
- Add specs for
lapis.exceptions.flow
- Clean out legacy Lapis spec conventions
Full Changelog: v2.3.0...v2.4.0
v2.3.0
https://luarocks.org/modules/leafo/lapis-exceptions
Changes
- Strip out invalid unicode characters before encoding
data
field to json on ExceptionRequests table. This will prevent errors likeERROR: unsupported Unicode escape sequence \u0000 cannot be converted to text
when attempting to query or read the json object. This could happen if someone placed malformed input into the lapisparams
object via query or post parameters.
Notes
If you have exception requests with invalid data you can delete them like so:
delete from exception_requests where data::text like '%\u0000%'
Adjust accordingly if you want to preserve the exception request.
Full Changelog: v2.2.0...v2.3.0
v2.2.0
https://luarocks.org/modules/leafo/lapis-exceptions
Migrations
None needed
Changes
Error label normalization has been substantially changed:
- fields for object access and method names are preserved where possible
- line numbers are removed from path fragments
lapis/application.lua
path prefix is removed (as it adds unnecessary noise to every error within an action)
v2.1.0
Add lapis.exceptions.remote_addr
module that returns a single function of the ip address of the current request to assign to the exception request when it's created
- By default, if the ip is 127.0.0.1, then the
x-forwarded-for
header will take precedence if it exists - This module can be overriden with
package.loaderd
to customize how the ip is chosen
v2.0.0
- Support for latest versions of Lapis
- Data fields now stored as json
- Add
protected_call
function - Fields
ip
,path
,method
,referer
can be overriden when creating exception - Sanitize UTF8 input strings to ensure recording exceptions does not trigger an error
- A bunch of minor updates, no interface changes