xforge · tài liệu FE

Mã lỗi #

Mọi error.code server có thể trả, kèm status và tham số trong details (kiểu: ErrorParams trong sdk/api.ts). Rẽ nhánh theo code, hiện message (server đã dịch). Câu mặc định từng mã: ERROR_CODES trong SDK.

MãStatusTham số (details)
account_disabled403
account_limits_unsupported409
account_locked429retryAfter
account_not_found404
account_required400
account_scope_required403
account_suspended403
api_key_forbidden403
api_key_ip_denied403
api_key_ips_unsupported409
api_key_limit409
api_key_not_found404
api_key_superuser403
api_keys_unsupported409
attributes_unsupported409
audit_resource_not_found404
branch_across_accounts400
brand_code_exists409
brand_not_found404
brand_slug_exists409
brand_translation_lang_exists409
brand_translation_not_found404
cart_code_rejected409code
cart_empty409
cart_full409
cart_guest_limit429retryAfter
cart_item_not_found404
cart_sign_in_required401
checkout_cart_empty409
checkout_cod_disabled409
checkout_cod_over_limit409max
condition_not_met403
condition_without_permission400
conditions_unsupported409
config_not_found404
config_scope_not_allowed400allowed
conflict409
coupon_code_exists409
coupon_not_applicable409code, reason
coupon_not_found404
coupon_only_one409code
coupon_product_not_found409
customer_auth_required401
customer_not_found404
customer_shared409
customer_type_code_exists409
customer_type_customer_not_found404
customer_type_inactive409
customer_type_not_found404
customer_type_price_rule_exists409
customer_type_price_rule_not_found404
customer_type_price_rule_ref_not_found404
customers_unsupported409
data_exports_unsupported409
data_imports_unsupported409
data_transfer_busy503
database_busy503
database_maintenance503retryAfter
database_not_found404
database_required400
database_scope_required403
database_upgrade_required409
dataset_not_found404
dedicated_single_account409
default_lang_not_in_languages400
delete_token_invalid401
duplicate_value409resource, fields
email_already_verified409
email_missing409
email_not_verified403
email_taken409
email_unsupported503
email_verification_disabled403, 503
empty_file400
erase_confirm_mismatch400
export_not_found404
export_not_ready409
export_too_large400
feature_not_in_plan403feature
feature_not_ready409
field_write_forbidden403fields
file_content_missing404
file_not_attachable400fileIds
file_not_found404
file_required400
file_too_large413maxBytes
forbidden403missing
gift_card_code_exists409
gift_card_in_use409
gift_card_insufficient_balance409balance
gift_card_not_applicable409code, reason
gift_card_not_found404
gift_card_order_not_found404
gift_card_refund_exceeds409amount, available
gift_card_refund_order_not_paid409paymentStatus
idempotency_in_progress409
idempotency_key_reused422
idempotency_response_withheld409
idempotency_unsupported400
impersonation_forbidden403
import_file_invalid400
import_file_missing404
import_not_found404
import_too_large413
import_too_many_rows400
import_upload_timeout408
internal_error500
invalid_api_key401
invalid_api_key_expiry400maxDays
invalid_api_key_scope400scopes
invalid_ca_cert400
invalid_condition400
invalid_credentials401
invalid_currency400
invalid_cursor400
invalid_idempotency_key400
invalid_json400
invalid_mfa_code401
invalid_multipart400
invalid_part_number400max
invalid_reference409resource, field
invalid_refresh_token401
invalid_rule400
invalid_rule_column400
invalid_rule_table400
invalid_step_up400
invalid_store_code400
invalid_store_relation400
invalid_timezone400
invalid_token401
invalid_transition409machine, status, action
job_not_deletable409
job_not_found404
job_not_retryable409
last_factor409
last_superuser409
login_taken409
managed_by_platform403
menu_entry_not_found404
menu_screen_not_declared404
mfa_code_required400methods
mfa_enrollment_required403
mfa_not_configured503
mfa_not_enabled409
mfa_proof_required400methods
mfa_sms_needs_factor409
mfa_sms_not_enrolled404, 409
mfa_ticket_invalid401
module_dependency_missing503module, missing
module_error400
module_in_use409
module_not_enabled404
module_not_installed404
module_required400
modules_not_installed400modules
momo_amount_out_of_range400min, max, amount
momo_currency_unsupported400currency
momo_rejected502resultCode, message
momo_unavailable503resultCode, message
no_store_access403
not_found404
notification_not_found404
order_cod_unavailable409
order_contact_required400
order_customer_not_found404
order_empty400
order_in_use409
order_invalid_transition409from, to
order_no_warehouse409
order_not_found404
order_paid_cancel409
order_payment_amount_mismatch409amount, total
order_payment_not_recordable409status, paymentStatus, paymentMethod
otp_invalid401
outside_store_scope403
part_size_mismatch400expected, received
part_too_large413maxBytes
passkey_invalid401reason
passkey_not_found404
passkeys_not_configured503
password_change_required403
password_change_unsupported409
password_hashing_busy503retryAfter
password_reset_disabled403, 503
password_unchanged400
payment_amount_invalid400amount, currency
payment_callback_url_missing503
payment_currency_mismatch409intent, transaction
payment_einvoice_not_retryable409
payment_intent_not_found404
payment_intent_not_payable409status
payment_intents_pending409count
payment_momo_order_missing409
payment_provider_not_configured409provider
payment_signature_invalid400
payment_transaction_not_found404
payment_transaction_not_unmatched409status
payment_webhook_invalid400
payment_webhook_unauthorized401
pdf_render_failed502
pdf_unavailable409
permission_not_conditional400
permission_overrides_unsupported409
phone_invalid400
phone_login_disabled403
phone_signup_details_required400
phone_taken409
plan_modules_unsupported409
pre_order_setting_not_found404
pre_order_setting_variant_exists409
pre_order_setting_variant_not_found404
price_code_not_recognized400code
price_currency_mismatch409
price_list_code_exists409
price_list_currency_mismatch400code, currency
price_list_customer_not_found409
price_list_item_duplicate409
price_list_not_found404
price_list_price_format400currency, digits
price_list_too_many_items409max
price_list_uom_not_found409
price_list_variant_not_found409
price_qty_not_exact400qty, factor
price_uom_invalid400uomId
price_variant_unavailable409variantId
print_email_repeat429
print_email_unavailable409
print_recipient_missing409
print_record_not_found404
print_too_large413
printable_not_found404
privilege_escalation403
product_attribute_code_exists409
product_attribute_not_found404
product_attribute_value_code_exists409
product_attribute_value_not_found404
product_barcode_exists409
product_brand_in_use409
product_brand_invalid400
product_category_code_exists409
product_category_cycle409
product_category_has_children409
product_category_in_use409
product_category_invalid400
product_category_not_found404
product_category_parent_not_found400
product_category_slug_exists409
product_category_too_deep409maxDepth
product_code_exists409
product_compare_at_price_too_low400
product_extra_uoms_invalid400
product_image_not_found404
product_import_currency_change409sku, currency
product_import_missing_fields400productCode, fields
product_import_price_format400currency, digits
product_import_row_conflict409productCode, column
product_import_sku_duplicate409sku
product_import_sku_other_product409sku, productCode
product_last_variant409
product_not_found404
product_not_publishable409reasons
product_sku_exists409
product_slug_exists409
product_too_many_variants409max
product_uom_in_use409
product_uom_invalid400ids
product_variant_attributes_mismatch409
product_variant_combination_exists409
product_variant_not_found404
product_variant_options_invalid400ids
product_variant_price_uom_invalid400ids
purchase_order_in_use409
purchase_order_invalid_status409status, action
purchase_order_item_not_found404itemId
purchase_order_not_found404
purchase_order_qty_not_exact400qty, factor
purchase_order_receive_exceeds_ordered409itemId, remaining
purchase_order_return_exceeds_received409itemId, received
purchase_order_supplier_invalid400
purchase_order_uom_invalid400uomId
purchase_order_variant_invalid400variantId
purchase_order_warehouse_invalid400
push_disabled409
push_subscription_not_found404
quota_exceeded403quota, limit, scope
quota_not_account_level400quotas
rate_limited429retryAfter, scope
realtime_unavailable503
record_rule_violation403
refresh_token_expired401
refresh_token_reused401
refresh_token_superseded401
refund_amount_exceeds409amount, available
refund_gateway_check_required409
refund_gateway_paid409
refund_momo_unavailable409
refund_not_found404
refund_not_gateway409
refund_not_pending409status
refund_order_not_found404
refund_order_not_paid409paymentStatus
refund_shipping_exceeds409shippingAmount, available
refund_shipping_over_amount400
report_email_required409
report_not_found404
report_params_invalid400
report_schedule_not_found404
report_schedules_unsupported409
report_too_large400
reset_token_invalid401
resource_in_use409resource, referencedBy
response_shape_mismatch500
return_request_detail_invalid409reason
return_request_invalid_status409status, action
return_request_item_not_found404
return_request_not_found404
return_request_order_not_found404
return_request_order_not_returnable409status
return_request_qty_exceeded409available
return_request_qty_not_exact400qty
return_request_refund_invalid409reason, max
role_exists409
role_not_found404
role_read_only403
rule_not_found404
rule_scope_unsupported409
secrets_not_configured503
self_attributes_forbidden403
sequences_unsupported409
session_limit_reached409maxSessions
session_not_found404
shipment_closed409status
shipment_cod_not_collected409status
shipment_invalid_transition409from, to
shipment_limit_reached409max
shipment_not_found404
shipment_on_the_way409
shipment_order_not_found404
shipment_order_not_fulfilled409
shipment_order_not_shippable409status
signup_disabled403
sms_otp_unavailable503
sms_unavailable503
social_email_required409ticket, expiresIn
social_identity_not_found404
social_identity_taken409
social_last_login_method409
social_link_required409
social_login_unsupported409
social_nonce_invalid401
social_nonce_unsupported400
social_phone_token_invalid401
social_provider_disabled403
social_provider_unavailable502
social_redirect_not_allowed400
social_redirect_unavailable403
social_state_invalid401
social_ticket_invalid401
social_token_invalid401
stock_batch_currency_mismatch409lotNumber, currency
stock_batch_not_found404
stock_batch_or_serial_required400
stock_count_already_open409number
stock_count_batch_not_found404batchId
stock_count_batch_required400variantId
stock_count_duplicate_line400
stock_count_in_use409
stock_count_invalid_status409status, action
stock_count_not_found404
stock_count_qty_not_exact400qty, factor
stock_count_ref_not_allowed400variantId
stock_count_serial_not_countable409serialId, status
stock_count_serial_qty_unit400
stock_count_serial_required400variantId
stock_count_uom_invalid400uomId
stock_count_variant_invalid400variantId
stock_count_warehouse_invalid400
stock_exceeds_reserved409
stock_insufficient_available409available
stock_insufficient_batch_available409available
stock_insufficient_on_hand409onHand
stock_level_not_found404
stock_location_not_found404
stock_lot_number_required400
stock_not_tracked400
stock_opening_balance_cost_forbidden403
stock_opening_balance_duplicate400sku
stock_opening_balance_has_stock409sku, onHand
stock_opening_balance_too_many_rows400max
stock_opening_balance_tracked400sku, mode
stock_operation_in_progress409
stock_product_in_use409
stock_qty_must_be_positive400
stock_serial_adjust_unit400
stock_serial_exists409serialNo
stock_serial_not_found404serialNo
stock_serial_numbers_required400
stock_serial_record_not_found404
stock_tracking_locked409
stock_transfer_in_use409
stock_transfer_invalid_status409status, action
stock_transfer_not_found404
stock_transfer_qty_not_exact400qty, factor
stock_transfer_same_warehouse400
stock_transfer_uom_invalid400uomId
stock_transfer_variant_invalid400variantId
stock_transfer_warehouse_invalid400warehouseId
stock_variant_in_use409
stock_variant_not_found404
stock_voucher_not_found404
stock_warehouse_in_use409
stock_warehouse_not_found404
store_access_denied403
store_code_taken409
store_has_parent409
store_inactive403
store_languages_unsupported409
store_module_in_use409modules, dependents
store_module_unavailable409module, reason
store_modules_unsupported409
store_not_found404
store_relation_cycle400
store_relation_exists409
store_relation_not_found404
store_required400stores
store_role_without_membership400
subscription_expired403expiredAt
superuser_job_forbidden403
superuser_no_account400
superuser_required403
supplier_code_exists409
supplier_not_found404
tax_code_exists409
tax_default_exists409
tax_not_found404
tax_product_invalid400
tax_rate_not_found404
tax_rate_overlaps409rateId
tax_rate_period_invalid400
tenancy_locked409
token_database_mismatch401
token_revoked401
token_store_mismatch401
too_many_attempts429retryAfter
too_many_exports429
too_many_imports429
too_many_parts400maxParts
too_many_report_schedules409
too_many_streams429
too_many_webhooks409
totp_already_enabled409
totp_not_enabled404
totp_not_setup400
trusted_device_not_found404
unauthorized401
unknown_modules400modules
unknown_permission400
unknown_plan_item400
unknown_role400
unknown_store400
unknown_webhook_event400event
unsupported_language400languages, allowed
uom_code_exists409
uom_not_found404
upload_expired410
upload_incomplete409missing
upload_not_active409status
upload_not_found404
user_not_found404
validation_failed400
value_invalid400resource, field
value_required400resource, field
verify_token_invalid401
version_conflict409currentVersion, version
warehouse_code_exists409
warehouse_location_code_exists409
warehouse_location_has_children409
warehouse_location_invalid_parent422
warehouse_location_not_found404
warehouse_location_too_deep422
warehouse_not_found404
webhook_backlog429
webhook_delivery_not_found404
webhook_inactive409
webhook_not_found404
webhooks_need_egress_proxy503
webhooks_unsupported409
wishlist_full409max
wishlist_item_not_found404
wishlist_variant_unavailable409