Closed kane-mason closed 3 years ago
I totally agree that these things should be exported as that does seem useful. With regard to logging the message, I think that's a great idea too. Usually I think it's best not to log the response, but for error messages I think that would be very helpful.
Fixed in 0.5.26
This seems to have stopped working!
Ok it seems the message is being logged, but is not displayed in the admin panel
Good catch! I just fixed this in version 1.0.1. Let me know if you see any issues.
Since expressa wraps all errors and appends a message. It should be possible to always log the
message
too to therequest_log
?I think it would be useful if you exposed some of the expressa utils to the consumer such
ApiError
so that the consumer can throw errors in the same way expressa does and they get logged consistenly.Other useful utils to expose to consumer include
generateDocumentId
- if you need to create records and want to ensure same uuid mechanism as expressacreateSecureRandomId
doLogin
- for custom (like social) login routing