Update API to d9a23f3: market_area refactor and structured errors#41
Merged
Marenz merged 1 commit intofrequenz-floss:v0.x.xfrom Mar 9, 2026
Merged
Conversation
3cdad1c to
853bb91
Compare
…ured errors Signed-off-by: Mathias L. Baumann <mathias.baumann@frequenz.com>
853bb91 to
8dad69b
Compare
| """Machine-readable classification of the failure.""" | ||
|
|
||
| error_message: str | ||
| """Human-readable diagnostic message for logging and debugging.""" |
There was a problem hiding this comment.
To keep in mind: If you need to add more error types in the future, then it'd be worth it have like a MarketMetering BaseError which includes code and message and can be used to compose different error types.
daniel-zullo-frequenz
approved these changes
Mar 9, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adapts the client to API commit d9a23f31446eeb62fe6599af23c49e563d49f0f3 which includes:
market_areamoved fromMarketLocationtoMarketLocationRef(immutable ref field)MarketLocationId.valuewrapped inMarketLocationIdValuemessageMarketLocationOperationResultnow useserror: MarketLocationOperationError | Noneinstead of flatsuccess/error_code/error_messagefieldsUpsertResultnow useserror: SampleUpsertError | Noneinstead of flatsuccess/error_code/error_messagefields, and includes echoeddirection/metric_type/metric_unitplusexisting_sampleon revision errorsMarketLocationsFilter.market_location_id_filtersnow takesMarketLocationIdValueinstead ofMarketLocationIdNew types:
MarketLocationOperationError,SampleUpsertError.README and CLI examples updated to include
market_areainMarketLocationRefand CLI arguments (formatenterprise_id:market_area:location_id:type).