Skip to content

Commit

Permalink
- Linting
Browse files Browse the repository at this point in the history
  • Loading branch information
nwithan8 committed Jun 4, 2024
1 parent d01efee commit 4d4708d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
func main() {
client := easypost.New("EASYPOST_API_KEY")

shipment, err := client.CreateShipment(
shipment, _ := client.CreateShipment(
&easypost.Shipment{
FromAddress: &easypost.Address{
Company: "EasyPost",
Expand Down Expand Up @@ -54,5 +54,5 @@ func main() {
},
)

fmt.Println(address)
fmt.Println(shipment)
}
7 changes: 5 additions & 2 deletions official/guides/errors-guide/csharp/catch-error.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,16 @@ public static async Task Main()
{
var client = new EasyPost.Client(new EasyPost.ClientConfiguration("EASYPOST_API_KEY"));

try {
try
{
Parameters.Address.Create parameters = new()
{
VerifyStrict = true
};
Address address = await client.Address.Create(parameters);
} catch (EasyPost.Exceptions.API.ApiError error) {
}
catch (EasyPost.Exceptions.API.ApiError error)
{
Console.Write(error.Code); // ADDRESS.VERIFY.FAILURE
}
}
Expand Down

0 comments on commit 4d4708d

Please sign in to comment.