Skip to content

Conversation

@radiumrasheed
Copy link
Contributor

@radiumrasheed radiumrasheed commented Dec 23, 2024

πŸ”— Linked issue

❓ Type of change

  • 🐞 Bug fix (a non-breaking change that fixes an issue)
  • πŸ‘Œ Enhancement (improving an existing functionality like performance)
  • ✨ New feature (a non-breaking change that adds functionality)
  • ⚠️ Breaking change (fix or feature that would cause existing functionality to change)

πŸ“š Description

This change allows us to customize the E_ROW_NOT_FOUND error as it sticks the affected model into the error class

if (error.code === 'E_ROW_NOT_FOUND') {
  return ctx.response.send({
    'status': 400,
    'message': 'Failed. ' + error.model.name + ' Not Found.' // Something like this!
  })
}

πŸ“ Checklist

  • I have linked an issue or discussion.
  • I have updated the documentation accordingly.

to identify model or table that was not found
@thetutlage thetutlage merged commit 334186f into adonisjs:21.x Dec 23, 2024
16 checks passed
@thetutlage
Copy link
Member

Thanks πŸ‘

nadlgit pushed a commit to nadlgit/adonisjs-lucid that referenced this pull request Jun 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants