-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Closed
Labels
c/cliRelated to CLIRelated to CLIe/intermediatecan be wrapped up in a weekcan be wrapped up in a weekp/mediumnon-urgent issues/features that are candidates for being included in one of the upcoming sprintsnon-urgent issues/features that are candidates for being included in one of the upcoming sprints
Description
While testing out #1863, I noticed that the error messages for invalid metadata could be more helpful. Currently, the errors show as:
FATA[0002] cannot apply metadata on the database: [constraint-error]
no foreign constraint exists on the given column
($.args[1].args.tables[7].object_relationships[0])
that corresponds to this object:
tables:
# ...
- array_relationships: []
delete_permissions: []
event_triggers: []
insert_permissions: []
object_relationships:
- comment: null
name: authGroupBygroupId
using:
foreign_key_constraint_on: group_id
- comment: null
name: authUserByuserId
using:
foreign_key_constraint_on: user_id
select_permissions: []
table: auth_user_groups
update_permissions: []It could be nice to use the names in the error message, as well as the indexes. For example:
FATA[0002] cannot apply metadata on the database: [constraint-error]
no foreign constraint exists on the given column
($.args[1].args.tables[7].object_relationships[0])
(table: auth_user_groups, object_relationship: authGroupBygroupId, foreign_key_constraint: group_id)
In general, Hasura has excellent error messages which I appreciate.
Metadata
Metadata
Assignees
Labels
c/cliRelated to CLIRelated to CLIe/intermediatecan be wrapped up in a weekcan be wrapped up in a weekp/mediumnon-urgent issues/features that are candidates for being included in one of the upcoming sprintsnon-urgent issues/features that are candidates for being included in one of the upcoming sprints