Skip to content

Error if state_or_province is longer than 2 characters #42

@damienmckenna

Description

@damienmckenna

If the state_or_province value is longer than two characters the FedEx API will return this error:

The length of the destination state or province code exceeds the limit of 2 characters. Please update and try again. (Code RECIPIENT.ADDRESSSTATEORPROVINCECODE.MAXCHAREXCEEDED)

This is because some countries use three letter characters for some state values, e.g. Queensland, Australia's short code is "QLD".

It would be worth truncating the state_or_province value to two characters before sending it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions