Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Should default output be included for invalid input? #45

Open
ctmay4 opened this issue Apr 6, 2018 · 0 comments
Open

Should default output be included for invalid input? #45

ctmay4 opened this issue Apr 6, 2018 · 0 comments
Assignees
Labels

Comments

@ctmay4
Copy link
Member

ctmay4 commented Apr 6, 2018

There are times when there is enough input to calculate a schema, however we don't process anything in staging because the inputs are not valid. The question is should the library return the outputs with default values in that case?

For example, EOD input that looks like this:

{
	"site": "C713",
	"hist": "8020",
	"behavior": "3",
	"eod_primary_tumor": "200",
	"eod_regional_nodes": "300",
	"eod_mets": "00",
	"year_dx": "2018"
}

returns the following:

{
	"result": "FAILED_INVALID_INPUT",
	"schema_id": "brain",
	"input": {
		"site": "C713",
		"hist": "8020",
		"behavior": "3",
		"eod_primary_tumor": "200",
		"eod_regional_nodes": "300",
		"eod_mets": "00",
		"year_dx": "2018"
	},
	"errors": [
		{
			"type": "INVALID_REQUIRED_INPUT",
			"table": "extension_bcc",
			"key": "eod_primary_tumor",
			"message": "Invalid 'eod_primary_tumor' value (200)"
		},
		{
			"type": "INVALID_REQUIRED_INPUT",
			"table": "nodes_dna",
			"key": "eod_regional_nodes",
			"message": "Invalid 'eod_regional_nodes' value (300)"
		}
	]
}

There is no output. However the brain schema does have default output values that could be returned.

image

Should they be returned?

@ctmay4 ctmay4 self-assigned this Apr 6, 2018
@ctmay4 ctmay4 added the question label Apr 6, 2018
ctmay4 added a commit that referenced this issue Apr 9, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant