Skip to content

Commit

Permalink
docs: fixes wrong variable name in example
Browse files Browse the repository at this point in the history
* Change missing method GetError to GetErrorEscaped in docs

* fix: replaces additional wrong reference

---------

Co-authored-by: Vincent Biret <[email protected]>
  • Loading branch information
JacieChao and baywet authored Nov 12, 2024
1 parent ca6f25e commit a515bd2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ func printOdataError(err error) {
case *odataerrors.ODataError:
typed := err.(*odataerrors.ODataError)
fmt.Printf("error:", typed.Error())
if terr := typed.GetError(); terr != nil {
if terr := typed.GetErrorEscaped(); terr != nil {
fmt.Printf("code: %s", *terr.GetCode())
fmt.Printf("msg: %s", *terr.GetMessage())
}
Expand Down Expand Up @@ -144,7 +144,7 @@ func printOdataError(err error) {
case *odataerrors.ODataError:
typed := err.(*odataerrors.ODataError)
fmt.Printf("error: %s", typed.Error())
if terr := typed.GetError(); terr != nil {
if terr := typed.GetErrorEscaped(); terr != nil {
fmt.Printf("code: %s", *terr.GetCode())
fmt.Printf("msg: %s", *terr.GetMessage())
}
Expand Down

0 comments on commit a515bd2

Please sign in to comment.