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
Currently, there are two error types in the Client implementation that essentially have the same meaning: Error::ObjectNotFound and Error::Problem(openadr_wire::problem::Problem) with a 404 error code.
The first is created in the get_*_by_name() methods, if the returned list is empty, while the second gets sent by the VTN, e.g., server.
It would be nice to streamline them somehow, such that a user of the library does not get surprised by at 'NotFound' error, although it properly handled one of the two error types.
I don't have a perfect proposal on how to deal with that ready yet. I could imagine integrating a special handling for a 404 status in the ClientRef::request() method, but there might be better alternatives.
The Error::is_not_found() method should be adopted accordingly.
The text was updated successfully, but these errors were encountered:
Currently, there are two error types in the Client implementation that essentially have the same meaning:
Error::ObjectNotFound
andError::Problem(openadr_wire::problem::Problem)
with a 404 error code.The first is created in the
get_*_by_name()
methods, if the returned list is empty, while the second gets sent by the VTN, e.g., server.It would be nice to streamline them somehow, such that a user of the library does not get surprised by at 'NotFound' error, although it properly handled one of the two error types.
I don't have a perfect proposal on how to deal with that ready yet. I could imagine integrating a special handling for a 404 status in the
ClientRef::request()
method, but there might be better alternatives.The
Error::is_not_found()
method should be adopted accordingly.The text was updated successfully, but these errors were encountered: