Short answer: The 25-word recovery phrase could not be turned into a key. The message is the same whether a word is wrong, the checksum is wrong or the word count is wrong, so you have to check which.
The exact message
failed to decode mnemonic
Source: Error, captured locally with algosdk 3.9.0 on 2026-12-03.
Why it happens
Three different faults were tried and all gave the identical message "failed to decode mnemonic": a word that is not in the list ("notaword"), a valid word in the checksum position that makes the checksum wrong, and 24 words instead of 25.
How to fix it
Count the words: an Algorand account mnemonic has exactly 25 words separated by single spaces (no line breaks, no numbering).
Check each word against the BIP-39 English word list; one typo is the usual cause.
If all 25 words are valid, the last word (the checksum) is wrong: a word was swapped or reordered.
Strip quotes and trailing whitespace if you read it from an environment variable.