Skip to content

Releases: leafo/lapis-exceptions

v2.4.0

20 Jul 22:27
Compare
Choose a tag to compare
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 to ExceptionsFlow:exception_types
  • Add delete action to ExceptionsFlow: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

22 Aug 21:26
Compare
Choose a tag to compare

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 like ERROR: 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 lapis params 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

28 Feb 21:02
Compare
Choose a tag to compare

https://luarocks.org/modules/leafo/lapis-exceptions

Migrations

None needed

Changes

Error label normalization has been substantially changed:

  1. fields for object access and method names are preserved where possible
  2. line numbers are removed from path fragments
  3. lapis/application.lua path prefix is removed (as it adds unnecessary noise to every error within an action)

v2.1.0

15 Feb 19:08
Compare
Choose a tag to compare

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

15 Feb 19:09
Compare
Choose a tag to compare
  • 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

v1.0.0

15 Feb 19:09
Compare
Choose a tag to compare

Initial release