คำตอบที่เป็นข้อผิดพลาดมีรหัสสำหรับโปรแกรมของคุณและประโยคที่แสดงให้ผู้ใช้เห็นได้
รูปแบบข้อผิดพลาด
ข้อผิดพลาด
{
"error": "bad_lang",
"message": "Choose the language readers should get, like en or pt-BR."
}
ทุกรหัส
นี่คือรหัสทั้งหมดที่เอนด์พอยต์ /v1 ส่งกลับ ระบบตรวจคีย์ก่อน ดังนั้นคำขอที่ไม่มีคีย์ที่ถูกต้องจะได้ 401 ไม่ว่าจะมีอะไรผิดอีก
| รหัส | สถานะ | เอนด์พอยต์ | ข้อความและความหมาย |
|---|---|---|---|
unauthorized | 401 | ทั้งหมด | “Send your API key as: Authorization: Bearer wg_…” (ส่งคีย์ API ของคุณในรูปแบบ: Authorization: Bearer wg_…) ไม่มีคีย์ พิมพ์ผิด หรือถูกเพิกถอนแล้ว |
inactive | 403 | links, warm | “This account is suspended, so new links can’t be made…” หรือ “…so pages can’t be loaded ahead…” (บัญชีนี้ถูกระงับ จึงสร้างลิงก์ใหม่ไม่ได้ หรือโหลดหน้าล่วงหน้าไม่ได้) พร้อมที่อยู่สำหรับเขียนถึง บัญชีถูกระงับ บัญชีใหม่ทุกบัญชีเริ่มในแพ็กเกจ Free จึงพบได้น้อย |
not_in_plan | 403 | ทั้งหมด | “The API and MCP are part of Starter, Pro and Premium. Choose a plan in Dashboard → Billing.” (API และ MCP เป็นส่วนหนึ่งของ Starter, Pro และ Premium เลือกแพ็กเกจในแดชบอร์ด → การเรียกเก็บเงิน) บัญชีอยู่ในแพ็กเกจ Free เช่น หลังจากแพ็กเกจที่ชำระเงินสิ้นสุด: คีย์ของบัญชีจะหยุดทำงานจนกว่าจะเลือกแพ็กเกจ |
not_in_plan | 403 | warm | “Loading pages ahead of time is part of Pro and Premium.” (การโหลดหน้าล่วงหน้าเป็นส่วนหนึ่งของ Pro และ Premium) |
over_quota | 403 | warm | “This month’s translated pages are used up, so there’s nothing to load ahead for.” (หน้าที่แปลของเดือนนี้ใช้หมดแล้ว จึงไม่มีอะไรให้โหลดล่วงหน้า) ลิงก์จะเปิดต้นฉบับจนถึงวันที่ 1 |
warm_limit | 429 | warm | “That’s as many pages as your plan loads ahead in a month.” (นี่คือจำนวนหน้าที่แพ็กเกจของคุณโหลดล่วงหน้าได้ในหนึ่งเดือน) เท่ากับจำนวนหน้าต่อเดือนของแพ็กเกจ: 1,000 ใน Pro และ 3,000 ใน Premium เริ่มนับใหม่ในวันที่ 1 |
bad_url | 400 | links, warm | “Enter the full address of the page, starting with https://” (ใส่ที่อยู่เต็มของหน้า โดยขึ้นต้นด้วย https://) หรือจาก warm: “Enter the full address, starting with https://” (ใส่ที่อยู่เต็ม โดยขึ้นต้นด้วย https://) ฟิลด์ url หายไปหรือไม่ใช่ที่อยู่เต็ม หรืออ่านเนื้อหาคำขอไม่ได้: ประเภทเนื้อหา (content type) ไม่ใช่ JSON หรือฟอร์ม หรือ JSON ไม่ถูกต้อง |
bad_url | 400 | links, warm | “That address can't be translated. Use a public web page.” (ที่อยู่นั้นแปลไม่ได้ ใช้หน้าเว็บสาธารณะ) เป็นที่อยู่ที่ตัวแปลจะไม่โหลด |
unsafe_url | 400 | links | “Google Safe Browsing lists this page as dangerous (phishing or malware), so Wallgone won't link to it.” (Google Safe Browsing ระบุว่าหน้านี้อันตราย (ฟิชชิงหรือมัลแวร์) Wallgone จึงไม่ลิงก์ไปที่หน้านี้) Google Web Risk ระบุว่าหน้านี้เป็นฟิชชิง มัลแวร์ หรือซอฟต์แวร์ที่ไม่พึงประสงค์ |
bad_lang | 400 | links | “Choose the language readers should get, like en or pt-BR.” (เลือกภาษาที่ผู้อ่านควรได้รับ เช่น en หรือ pt-BR) |
bad_links | 400 | links/bulk | “Send 1 to 500 links: …” (ส่ง 1 ถึง 500 ลิงก์: …) links หายไป ว่างเปล่า ไม่ใช่รายการ หรือยาวเกิน 500 ให้ส่งลิงก์เพิ่มในหลายคำขอ |
bad_lang_switch | 400 | links | “lang_switch is true, false, or left out for the account’s setting.” (lang_switch เป็น true, false หรือเว้นไว้เพื่อใช้ค่าตามการตั้งค่าของบัญชี) |
bad_country | 400 | links, warm | “Use a two-letter country code like jp, or leave it out.” (ใช้รหัสประเทศสองตัวอักษร เช่น jp หรือเว้นไว้) |
blocked | 403 | warm | “This publisher asked not to be translated, so its pages open as they are.” (ผู้เผยแพร่รายนี้ขอไม่ให้แปล หน้าของเขาจึงเปิดตามต้นฉบับ) |
plan_changing | 409 | warm | “Your plan changed a moment ago. Try again in 30 seconds.” (แพ็กเกจของคุณเพิ่งเปลี่ยน ลองอีกครั้งใน 30 วินาที) |
not_found | 404 | ทั้งหมด | “No such endpoint.” (ไม่มีเอนด์พอยต์นี้) เส้นทางหรือเมธอดไม่ถูกต้อง เช่น GET /v1/warm |
server | 500 | ทั้งหมด | “Something went wrong on our side. Try again in a minute.” (เกิดข้อผิดพลาดที่ฝั่งเรา ลองอีกครั้งในอีกสักครู่) |
translator | 502 | warm | “Couldn't reach the translator. Try again in a minute.” (เชื่อมต่อตัวแปลไม่ได้ ลองอีกครั้งในอีกสักครู่) |