Improved base64 parsing error

This commit is contained in:
Grahame Grieve 2024-07-28 20:04:28 +08:00
parent 71e8a8294a
commit c99b7ee53a
1 changed files with 1 additions and 1 deletions

View File

@ -157,7 +157,7 @@ public class Base64BinaryType extends PrimitiveType<byte[]> implements IPrimitiv
*/
public void checkValidBase64(String toCheck) throws DataFormatException {
if (!org.hl7.fhir.utilities.Base64.isBase64(toCheck.getBytes())) {
throw new DataFormatException("");
throw new DataFormatException("Invalid Base64 content: "+toCheck.substring(0, 10)+"...");
}
}
}