You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Apr 3, 2019. It is now read-only.
…dikoff,@philboothFixes#10Fixes#99
Connects to #116
This was my first experience messing with the queues part of the service, I thought dealing with these issues first would make the experience smoother. I added the standard logging and error handling with the failure crate just like the rest of the lib.
Since our errors were very much centered around requests and rocket, we have some fields that don't really make sense for the queues process, like the http code, so let me know what you think about that and if the queues process should have a different error format. I also did another minor change to the errors: now the response JSON will return a number for code and errno, instead of a string.
For logging, I implemented an AppErrorFields so that we get better structured logs for our AppErrors. I used slog_scope to make it easier to have a global logger for the queues process, let me know what you think about that... In the README.md for that crate, they have some warnings about it not being the best idea all the time, but anyways, I thought it was neat and worked well for our case.
Finally, when I started working in the queues they were not really working due to parsing errors, you will see that I changed a little bit the SQS Notification struct, that was for parsing to work, also I created a notification-dev queue in the AWS Console, because it didn't exist yet, I think everything is working fine now.
This needs a little bit more digging, but there are some log/error messages that could be improved.
Like, if we try and send in a request with missing params, it will return the following log:
Here, it would be nicer to know, for example, which are the missing params. In auth server we just add more properties to some of our error messages when they need more info (https://github.com/mozilla/fxa-auth-server/blob/master/docs/api.md#response-format), that could be a solution here.
Anyways, probably not something urgent, but I just noticed this and thought would be best to document it.
The text was updated successfully, but these errors were encountered: