appwrite/tests/resources/functions/log-error-truncation/index.js

14 lines
464 B
JavaScript
Raw Normal View History

2025-08-20 13:23:55 +00:00
module.exports = async(context) => {
// Create a string that is 1000001 characters long (exceeds the 1000000 limit)
const longString = 'z' + 'a'.repeat(1000000);
2025-08-20 13:23:55 +00:00
context.log(longString);
2025-08-21 09:02:48 +00:00
context.error(longString);
2025-08-20 13:23:55 +00:00
return context.res.json({
motto: 'Build like a team of hundreds_',
learn: 'https://appwrite.io/docs',
connect: 'https://appwrite.io/discord',
getInspired: 'https://builtwith.appwrite.io',
});
};