DirectoryAPIでユーザを追加する際、ライセンス数の上限を上まった時のエラー
{
"code" : 412,
"errors" : [ {
"domain" : "global",
"location" : "If-Match",
"locationType" : "header",
"message" : "Domain user limit reached.",
"reason" : "limitExceeded"
} ],
"message" : "Domain user limit reached."
}
com.google.apis:google-api-services-admin-directory を使っている場合は、GoogleJsonResponseException#getStatusCode()
が412である事を確認すれば良い。