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

Get error message from AGOL #77

Open
jacobdadams opened this issue Nov 28, 2023 · 7 comments
Open

Get error message from AGOL #77

jacobdadams opened this issue Nov 28, 2023 · 7 comments
Labels
enhancement New feature or request

Comments

@jacobdadams
Copy link
Member

If we get an odd error 500, create something that grabs the token and job id and returns the error automatically rather than requiring the end user to do it manually.

@jacobdadams jacobdadams added the enhancement New feature or request label Nov 28, 2023
@steveoh
Copy link
Member

steveoh commented Nov 28, 2023

Will you elaborate on this a bit @stdavis or @jacobdadams since I'm unfamiliar with the issue? What error messages are we having trouble accessing? What actions are the job ids linked to? What is the manual process for getting the error message?

@jacobdadams
Copy link
Member Author

Yeah, it's pretty well spelled out near the bottom of the readme

@stdavis
Copy link
Member

stdavis commented Nov 28, 2023

It would be great if this was generic enough to be useable in other projects such as forklift.

@jacobdadams
Copy link
Member Author

Agreed. Spitballing here, I wonder if writing it as a decorator makes sense. I'll look into that when I've got some prof dev time.

Also, again spitballing, I wonder if we could modify forklift to use the classes from palletjack for any AGOL work? Bring all our "foo to AGOL" workflows under one codebase?

@jacobdadams
Copy link
Member Author

jacobdadams commented Mar 13, 2024

Thought: get token programmatically from arcgis.auth module

Or, apparently, you can get it from the gis object

@crosner13
Copy link

Hey @jacobdadams, I was the one who was talking about grabbing a token from the GIS object today!

from arcgis.gis import GIS  
gis = GIS("https://www.arcgis.com", "your_username", "********")
token = gis._con.token
print(token)

This is how I will sometimes access the token via the GIS object. Alternatively, I'll access it with requests and a call to the REST API.

@jacobdadams
Copy link
Member Author

jacobdadams commented Mar 14, 2024 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants