Search code examples
mediatorwolverine

Log Messages in Wolverine Indicating Possible Problem about Failed Route Determination


I'm very new to Wolverine and noticed a bunch of INF level log messages when processing a request:

[17:41:55 INF] No routes can be determined for Envelope #018d971d-986c-486f-9d65-5eaa449fa40b (String)
[17:41:55 INF] No routes can be determined for Envelope #018d971d-986c-4abe-a382-bdd6417fe1f5 (String)
[17:41:55 INF] No routes can be determined for Envelope #018d971d-986d-45f7-8202-d1dabd7ecaa2 (String)
[17:41:55 INF] No routes can be determined for Envelope #018d971d-986d-4055-8ba5-e3981ef2d9fb (String)
[17:41:55 INF] No routes can be determined for Envelope #018d971d-986e-4682-aacd-650b1ac4a466 (String)
[17:41:55 INF] No routes can be determined for Envelope #018d971d-986e-406d-8891-4c8843cd92bb (String)
[17:41:55 INF] No routes can be determined for Envelope #018d971d-986f-4fc1-b60d-8111b196fa5c (String)

The request still worked, matching the Query with the Handler and 200 OK response.

The handler retuned a simple list of strings Task<IReadOnlyList<string>>

Simple question, are these messages anything to worry about. (They're not exactly positive) 😁

Thanks


Solution

  • I have come up with a way of making those log messages going away and perhaps learnt a bit about how you are meant to work with this library.

    As you can see, my Handler returned a primitive type wrapped in a Task i.e. IReadOnlyList<string>.

    When I wrapped that list in a response object, the log messages went away. I believe the concept of the Envelope requires a complex type to be returned from the handler. A notion of strong typing coming into play.

    public class GetTimeZonesQueryResponse
    {
        public IReadOnlyList<string> TimeZones { get; set; }
    }
    

    Hope this helps other newcomers to this framework.